From 54b17f985d55b9e0bd8d0c98eff467f0eff22d07 Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 31 Oct 2018 11:46:28 +0100 Subject: [PATCH] When replica kills a pending RDB save during SYNC, log it. This logs what happens in the context of the fix in PR #5367. --- src/replication.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/replication.c b/src/replication.c index 8f49dc2fd..fa0047041 100644 --- a/src/replication.c +++ b/src/replication.c @@ -1246,6 +1246,12 @@ void readSyncBulkPayload(aeEventLoop *el, int fd, void *privdata, int mask) { /* Ensure background save doesn't overwrite synced data */ if (server.rdb_child_pid != -1) { + serverLog(LL_NOTICE, + "Replica is about to load the RDB file received from the " + "master, but there is a pending RDB child running. " + "Killing process %ld and removing its temp file to avoid " + "any race", + (long) server.rdb_child_pid); kill(server.rdb_child_pid,SIGUSR1); rdbRemoveTempFile(server.rdb_child_pid); }