zhixinwen commented on code in PR #3098:
URL: https://github.com/apache/kvrocks/pull/3098#discussion_r2253032221


##########
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);

Review Comment:
   We should not set high watermark, because if there is more data than high 
watermark, no more data would be read into the buffer from the Internet. We 
should read as much data as possible for optimal throughput.
   
   Leaving high watermark as zero would disable it.
   https://github.com/libevent/libevent/blob/master/bufferevent_sock.c#L174



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to