Diskless replication: log BGSAVE delay only when it is non-zero.

This commit is contained in:
antirez 2014-10-27 10:48:32 +01:00
parent bafd3f646f
commit 16319c69b1

View File

@ -527,7 +527,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) {