zhaozhao.zz 131857e80a
To avoid bouncing -REDIRECT during FAILOVER (#871)
Fix #821

During the `FAILOVER` process, when conditions are met (such as when the
force time is reached or the primary and replica offsets are
consistent), the primary actively becomes the replica and transitions to
the `FAILOVER_IN_PROGRESS` state. After the primary becomes the replica,
and after handshaking and other operations, it will eventually send the
`PSYNC FAILOVER` command to the replica, after which the replica will
become the primary. This means that the upgrade of the replica to the
primary is an asynchronous operation, which implies that during the
`FAILOVER_IN_PROGRESS` state, there may be a period of time where both
nodes are replicas. In this scenario, if a `-REDIRECT` is returned, the
request will be redirected to the replica and then redirected back,
causing back and forth redirection. To avoid this situation, during the
`FAILOVER_IN_PROGRESS state`, we temporarily suspend the clients that
need to be redirected until the replica truly becomes the primary, and
then resume the execution.

---------

Signed-off-by: zhaozhao.zz <zhaozhao.zz@alibaba-inc.com>
2024-08-14 14:04:29 +08:00
..
2024-06-03 12:22:06 -07:00
2024-05-22 23:24:12 -07:00
2024-06-30 11:33:10 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-07-18 19:21:45 -07:00
2024-07-18 19:21:45 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-28 09:27:51 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-08-12 16:33:23 -07:00
2024-07-08 20:01:39 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-07-02 15:45:37 -07:00
2024-07-18 19:21:45 -07:00
2024-07-18 19:21:45 -07:00
2024-07-08 20:01:39 -07:00
2024-05-22 23:24:12 -07:00
2024-06-07 01:40:55 +02:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-07-20 23:48:00 +02:00
2024-05-22 23:24:12 -07:00
2024-07-18 19:21:45 -07:00
2024-07-02 15:45:37 -07:00
2024-07-02 15:45:37 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2020-05-05 23:35:08 -04:00
2024-05-22 23:24:12 -07:00
2024-07-18 19:21:45 -07:00
2024-05-22 23:24:12 -07:00
2024-07-02 15:45:37 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-07-17 13:59:33 -07:00
2024-06-07 01:40:55 +02:00
2024-05-22 23:24:12 -07:00
2024-07-02 15:45:37 -07:00
2024-07-02 15:45:37 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2021-07-10 10:04:54 -05:00
2024-05-22 23:24:12 -07:00
2024-07-08 20:01:39 -07:00
2024-05-22 23:24:12 -07:00
2024-06-30 11:33:10 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-07-08 20:01:39 -07:00
2024-07-08 20:01:39 -07:00
2024-05-27 23:03:34 +02:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00