From 8a618971bd87dc3121cfeedc48e07a108895a417 Mon Sep 17 00:00:00 2001 From: antirez Date: Fri, 17 Oct 2014 10:23:44 +0200 Subject: [PATCH] Diskless replication: don't send "\n" pings to slaves. This is useful for normal replication in order to refresh the slave when we are persisting on disk, but for diskless replication the child is already receiving data while in WAIT_BGSAVE_END state. --- src/replication.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/replication.c b/src/replication.c index d80b7db3..80eabc22 100644 --- a/src/replication.c +++ b/src/replication.c @@ -1785,7 +1785,9 @@ void replicationCron(void) { redisClient *slave = ln->value; if (slave->replstate == REDIS_REPL_WAIT_BGSAVE_START || - slave->replstate == REDIS_REPL_WAIT_BGSAVE_END) { + (slave->replstate == REDIS_REPL_WAIT_BGSAVE_END && + server.rdb_child_type != REDIS_RDB_CHILD_TYPE_SOCKET)) + { if (write(slave->fd, "\n", 1) == -1) { /* Don't worry, it's just a ping. */ }