Skip to content

Commit a06cf15

Browse files
authored
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 <[email protected]>
1 parent 86db609 commit a06cf15

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/replication.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4097,7 +4097,8 @@ void syncWithPrimary(connection *conn) {
40974097
* but there is nothing technically wrong with a full resync which
40984098
* could happen in edge cases. */
40994099
if (server.failover_state == FAILOVER_IN_PROGRESS) {
4100-
if (psync_result == PSYNC_CONTINUE || psync_result == PSYNC_FULLRESYNC) {
4100+
if (psync_result == PSYNC_CONTINUE || psync_result == PSYNC_FULLRESYNC ||
4101+
psync_result == PSYNC_FULLRESYNC_DUAL_CHANNEL) {
41014102
clearFailoverState(true);
41024103
} else {
41034104
abortFailover("Failover target rejected psync request");

0 commit comments

Comments
 (0)