Allow dual channel full sync in plain failover (#2659)

PSYNC_FULLRESYNC_DUAL_CHANNEL is also a full sync, as the comment says,
we need to allow it. While we have not yet identified the exact edge case
that leads to this line, but during a failover, there should be no difference
between different sync strategies.

Signed-off-by: Binbin <binloveplay1314@qq.com>
This commit is contained in:
Binbin 2025-11-15 12:57:27 +08:00 committed by GitHub
parent 86db609219
commit a06cf15b20
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -4097,7 +4097,8 @@ void syncWithPrimary(connection *conn) {
* but there is nothing technically wrong with a full resync which
* could happen in edge cases. */
if (server.failover_state == FAILOVER_IN_PROGRESS) {
if (psync_result == PSYNC_CONTINUE || psync_result == PSYNC_FULLRESYNC) {
if (psync_result == PSYNC_CONTINUE || psync_result == PSYNC_FULLRESYNC ||
psync_result == PSYNC_FULLRESYNC_DUAL_CHANNEL) {
clearFailoverState(true);
} else {
abortFailover("Failover target rejected psync request");