mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 17:10:50 +00:00
Diskless replication: don't send "\n" pings to slaves.
This is useful for normal replication in order to refresh the slave when we are persisting on disk, but for diskless replication the child is already receiving data while in WAIT_BGSAVE_END state.
This commit is contained in:
parent
25a3d9965e
commit
4b16263bd9
@ -1950,7 +1950,9 @@ void replicationCron(void) {
|
|||||||
redisClient *slave = ln->value;
|
redisClient *slave = ln->value;
|
||||||
|
|
||||||
if (slave->replstate == REDIS_REPL_WAIT_BGSAVE_START ||
|
if (slave->replstate == REDIS_REPL_WAIT_BGSAVE_START ||
|
||||||
slave->replstate == REDIS_REPL_WAIT_BGSAVE_END) {
|
(slave->replstate == REDIS_REPL_WAIT_BGSAVE_END &&
|
||||||
|
server.rdb_child_type != REDIS_RDB_CHILD_TYPE_SOCKET))
|
||||||
|
{
|
||||||
if (write(slave->fd, "\n", 1) == -1) {
|
if (write(slave->fd, "\n", 1) == -1) {
|
||||||
/* Don't worry, it's just a ping. */
|
/* Don't worry, it's just a ping. */
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user