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.
This commit is contained in:
antirez 2013-05-27 10:45:37 +02:00
parent a74f8fe1ad
commit 45e6a4023a

View File

@ -1422,6 +1422,10 @@ void replicationCron(void) {
}
}
/* 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
* be able to detect a link disconnection even if the TCP connection