From 89d544d6f263561160352db14afe8c70cdb7e707 Mon Sep 17 00:00:00 2001 From: Wang Yuan Date: Wed, 19 Aug 2020 15:52:53 +0800 Subject: [PATCH] Add comments on 'slave.repldboff' when use diskless replication (#7679) --- src/replication.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/replication.c b/src/replication.c index 1e1be345c..d629a197f 100644 --- a/src/replication.c +++ b/src/replication.c @@ -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; }