From 45e6a4023a0a40d5f882dd19aa874d94ada516b6 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 2042389d..348428c5 100644 --- a/src/replication.c +++ b/src/replication.c @@ -1421,6 +1421,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