git-hulk commented on code in PR #3061:
URL: https://github.com/apache/kvrocks/pull/3061#discussion_r2217107712


##########
src/cluster/replication.cc:
##########
@@ -103,6 +108,52 @@ void FeedSlaveThread::checkLivenessIfNeed() {
   }
 }
 
+void FeedSlaveThread::staticReadCallback(bufferevent *bev, void *ctx) {

Review Comment:
   how about changing it to `replicaReadCallback`



##########
src/cluster/replication.cc:
##########
@@ -563,12 +611,13 @@ ReplicationThread::CBState 
ReplicationThread::tryPSyncReadCB(bufferevent *bev) {
 ReplicationThread::CBState ReplicationThread::incrementBatchLoopCB(bufferevent 
*bev) {
   repl_state_.store(kReplConnected, std::memory_order_relaxed);
   auto input = bufferevent_get_input(bev);
+  bool data_written = false;
   while (true) {
     switch (incr_state_) {
       case Incr_batch_size: {
         // Read bulk length
         UniqueEvbufReadln line(input, EVBUFFER_EOL_CRLF_STRICT);
-        if (!line) return CBState::AGAIN;
+        if (!line) goto AGAIN_LABEL;  // NOLINT

Review Comment:
   Could we avoid the goto statement?



-- 
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