You need to sign in or sign up before continuing.
Commit e06a5604 authored by antirez's avatar antirez
Browse files

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.
parent efd87031
...@@ -1441,6 +1441,10 @@ void replicationCron(void) { ...@@ -1441,6 +1441,10 @@ void replicationCron(void) {
redisLog(REDIS_NOTICE,"MASTER <-> SLAVE sync started"); 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. /* If we have attached slaves, PING them from time to time.
* So slaves can implement an explicit timeout to masters, and will * So slaves can implement an explicit timeout to masters, and will
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment