Add comments on 'slave.repldboff' when use diskless replication (#7679)

This commit is contained in:
Wang Yuan 2020-08-19 15:52:53 +08:00 committed by GitHub
parent b87c288016
commit 89d544d6f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1186,6 +1186,8 @@ void rdbPipeReadHandler(struct aeEventLoop *eventLoop, int fd, void *clientData,
/* An error and still in connected state, is equivalent to EAGAIN */
slave->repldboff = 0;
} else {
/* Note: when use diskless replication, 'repldboff' is the offset
* of 'rdb_pipe_buff' sent rather than the offset of entire RDB. */
slave->repldboff = nwritten;
server.stat_net_output_bytes += nwritten;
}