SzyWilliam commented on code in PR #997:
URL: https://github.com/apache/ratis/pull/997#discussion_r1433370185


##########
ratis-grpc/src/main/java/org/apache/ratis/grpc/server/GrpcLogAppender.java:
##########
@@ -204,8 +207,9 @@ private void resetClient(AppendEntriesRequest request, 
Event event) {
           .map(TermIndex::getIndex)
           .orElseGet(f::getMatchIndex);
       if (event.isError() && request == null) {
-        LOG.warn("{}: Follower failed (request=null, errorCount={}); keep 
nextIndex ({}) unchanged and retry.",
-            this, errorCount, f.getNextIndex());
+        BatchLogger.warn(LOG, BatchLogger.makeUniqueId(f.getId(), 
f.getNextIndex()), () ->
+            LOG.warn("{}: Follower failed (request=null, errorCount={}); keep 
nextIndex ({}) unchanged and retry.",
+                this, errorCount, f.getNextIndex()), 
exceptionalWarnLogBatchDuration);

Review Comment:
   You are right, Thanks for catching this bug!



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