diff --git a/src/rdb.cpp b/src/rdb.cpp index 2cac89178..d446109fa 100644 --- a/src/rdb.cpp +++ b/src/rdb.cpp @@ -2547,7 +2547,7 @@ rdbSaveInfo *rdbPopulateSaveInfo(rdbSaveInfo *rsi) { * connects to us, the NULL repl_backlog will trigger a full * synchronization, at the same time we will use a new replid and clear * replid2. */ - if (!listLength(g_pserver->masters) && g_pserver->repl_backlog) { + if (g_pserver->fActiveReplica || (!listLength(g_pserver->masters) && g_pserver->repl_backlog)) { /* Note that when g_pserver->slaveseldb is -1, it means that this master * didn't apply any write commands after a full synchronization. * So we can let repl_stream_db be 0, this allows a restarted slave