From cdfcc42b6d5e12ecda46be4ea4b274407601cc79 Mon Sep 17 00:00:00 2001 From: John Sully Date: Fri, 27 Sep 2019 13:17:29 -0400 Subject: [PATCH] Fix leaking stale RDBs during multimaster sync Former-commit-id: e1c96209510b374e644e5d7e7b6a009ed0f27c32 --- src/replication.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/replication.cpp b/src/replication.cpp index e817e6000..e440c5440 100644 --- a/src/replication.cpp +++ b/src/replication.cpp @@ -1553,6 +1553,8 @@ void readSyncBulkPayload(aeEventLoop *el, int fd, void *privdata, int mask) { return; } /* Final setup of the connected slave <- master link */ + if (fUpdate) + unlink(mi->repl_transfer_tmpfile); // if we're not updating this became the backup RDB zfree(mi->repl_transfer_tmpfile); close(mi->repl_transfer_fd); replicationCreateMasterClient(mi, mi->repl_transfer_s,rsi.repl_stream_db);