zhixinwen commented on code in PR #3061:
URL: https://github.com/apache/kvrocks/pull/3061#discussion_r2217905060
##########
src/cluster/replication.cc:
##########
@@ -601,14 +658,15 @@ ReplicationThread::CBState
ReplicationThread::incrementBatchLoopCB(bufferevent *
if (!s.IsOK()) {
error("[replication] CRITICAL - Failed to write batch to local, {}.
batch: 0x{}", s.Msg(),
util::StringToHex(batch.Data()));
- return CBState::RESTART;
+ return {CBState::RESTART, data_written};
Review Comment:
get it, I updated it here:
https://github.com/apache/kvrocks/pull/3061/commits/9d44339c4d130923f84716bf3bddb73e6ba3846d.
I don't think we should send ack after applying each write batch though,
because if there are several batches in one read callback, it is more efficient
to write all of the batches and ack once.
--
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]