From e06a560466e53b3a8a8e2b2fa232635ef962b1db Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 27 May 2013 10:45:37 +0200 Subject: [PATCH] Send ACK to master once every second. ACKs can be also used as a base for synchronous replication. However in that case they'll be explicitly requested by the master when the client sends a request that needs to be replicated synchronously. --- src/replication.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/replication.c b/src/replication.c index a326ee8a..2791f3b9 100644 --- a/src/replication.c +++ b/src/replication.c @@ -1441,6 +1441,10 @@ void replicationCron(void) { redisLog(REDIS_NOTICE,"MASTER <-> SLAVE sync started"); } } + + /* Send ACK to master from time to time. */ + if (server.masterhost && server.master) + replicationSendAck(); /* If we have attached slaves, PING them from time to time. * So slaves can implement an explicit timeout to masters, and will