diff --git a/src/replication.c b/src/replication.c index 3b4059c339663d4f9161692ac915b0c912fc1525..d8478fbbcc77cbf869d78536a8762f97d2c48cb4 100644 --- a/src/replication.c +++ b/src/replication.c @@ -1806,6 +1806,13 @@ void syncWithMaster(aeEventLoop *el, int fd, void *privdata, int mask) { } } + /* Stop background saving for obsolete database state. */ + server.dirty = 0; + if (server.rdb_child_pid != -1) { + kill(server.rdb_child_pid,SIGUSR1); + rdbRemoveTempFile(server.rdb_child_pid); + } + /* Prepare a suitable temp file for bulk transfer */ while(maxtries--) { snprintf(tmpfile,256,