diff --git a/src/replication.c b/src/replication.c index b3220e8a44..56f784f817 100644 --- a/src/replication.c +++ b/src/replication.c @@ -2862,6 +2862,8 @@ void dualChannelSyncSuccess(void) { if (streamReplDataBufToDb(server.primary) == C_ERR) { /* Sync session aborted during repl data streaming. */ serverLog(LL_WARNING, "Failed to stream local replication buffer into memory"); + replicationAbortDualChannelSyncTransfer(); + replicationUnsetPrimary(); return; } freePendingReplDataBuf(); diff --git a/tests/integration/replication-buffer.tcl b/tests/integration/replication-buffer.tcl index 2303d01273..18f8aa7eb5 100644 --- a/tests/integration/replication-buffer.tcl +++ b/tests/integration/replication-buffer.tcl @@ -27,6 +27,9 @@ start_server {} { # Make sure replica3 is synchronized with master $replica3 replicaof $master_host $master_port wait_for_sync $replica3 + if {$dualchannel == "yes"} { + wait_for_ofs_sync $master $replica3 + } # Generating RDB will take some 100 seconds $master config set rdb-key-save-delay 1000000