From a27befc495009693ee4c9c110fe7132f330ac25d Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 27 Oct 2014 10:48:32 +0100 Subject: [PATCH] Diskless replication: log BGSAVE delay only when it is non-zero. --- src/replication.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/replication.c b/src/replication.c index 0b40110a..e9c98c5c 100644 --- a/src/replication.c +++ b/src/replication.c @@ -528,7 +528,8 @@ void syncCommand(redisClient *c) { * replicationCron() since we want to delay its start a * few seconds to wait for more slaves to arrive. */ c->replstate = REDIS_REPL_WAIT_BGSAVE_START; - redisLog(REDIS_NOTICE,"Delay next BGSAVE for SYNC"); + if (server.repl_diskless_sync_delay) + redisLog(REDIS_NOTICE,"Delay next BGSAVE for SYNC"); } else { /* Ok we don't have a BGSAVE in progress, let's start one. */ if (startBgsaveForReplication() != REDIS_OK) {