This is an automated email from the ASF dual-hosted git repository.
twice pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/kvrocks.git
The following commit(s) were added to refs/heads/unstable by this push:
new 98453a129 feat(replication): set low watermark when reading
replication data (#3098)
98453a129 is described below
commit 98453a1293794c387d8cdbfeb944b39711ffee2d
Author: Zhixin Wen <[email protected]>
AuthorDate: Wed Aug 6 03:26:19 2025 -0700
feat(replication): set low watermark when reading replication data (#3098)
Co-authored-by: Twice <[email protected]>
---
src/cluster/replication.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/cluster/replication.cc b/src/cluster/replication.cc
index 3fe67e437..f9ab9d7c2 100644
--- a/src/cluster/replication.cc
+++ b/src/cluster/replication.cc
@@ -671,6 +671,8 @@ ReplicationThread::CBState
ReplicationThread::incrementBatchLoopCB(bufferevent *
if (data_written) {
sendReplConfAck(bev, force_ack);
}
+ // set a watermark so the callback won't be called again until the
data is enough
+ bufferevent_setwatermark(bev, EV_READ, incr_bulk_len_ + 2, 0);
return CBState::AGAIN;
}