From 4e012daee97f1d3a3ea8dcef338ce8ef26f2325b Mon Sep 17 00:00:00 2001 From: rangerzhang <928815211@qq.com> Date: Thu, 10 Mar 2022 15:51:55 +0800 Subject: [PATCH] Fix outdated comments on updateSlavesWaitingBgsave (#10394) * fix-replication-comments The described capacity `and to schedule a new BGSAVE if there are slaves that attached while a BGSAVE was in progress` was moved to `checkChildrenDone()` named by `replicationStartPendingFork` But the comment was not changed, may misleading others. * remove-misleading-comments The described capacity `to schedule a new BGSAVE if there are slaves that attached while a BGSAVE was in progress` and `or when the replication RDB transfer strategy is modified from disk to socket or the other way around` were not correct now. --- src/replication.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/replication.c b/src/replication.c index 9c2d110b02..64791016a6 100644 --- a/src/replication.c +++ b/src/replication.c @@ -1528,15 +1528,7 @@ void rdbPipeReadHandler(struct aeEventLoop *eventLoop, int fd, void *clientData, } } -/* This function is called at the end of every background saving, - * or when the replication RDB transfer strategy is modified from - * disk to socket or the other way around. - * - * The goal of this function is to handle slaves waiting for a successful - * background saving in order to perform non-blocking synchronization, and - * to schedule a new BGSAVE if there are slaves that attached while a - * BGSAVE was in progress, but it was not a good one for replication (no - * other slave was accumulating differences). +/* This function is called at the end of every background saving. * * The argument bgsaveerr is C_OK if the background saving succeeded * otherwise C_ERR is passed to the function.