From d982f443727bb226652d5c6a8320ed1962df1727 Mon Sep 17 00:00:00 2001 From: Qu Chen Date: Mon, 1 Aug 2016 12:16:17 -0700 Subject: [PATCH] Fix a bug to delay bgsave while AOF rewrite in progress for replication --- src/replication.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/replication.c b/src/replication.c index 471ad1a0..fb96fac1 100644 --- a/src/replication.c +++ b/src/replication.c @@ -676,7 +676,7 @@ void syncCommand(client *c) { /* Target is disk (or the slave is not capable of supporting * diskless replication) and we don't have a BGSAVE in progress, * let's start one. */ - if (server.aof_child_pid != -1) { + if (server.aof_child_pid == -1) { startBgsaveForReplication(c->slave_capa); } else { serverLog(LL_NOTICE,