szetszwo commented on code in PR #855:
URL: https://github.com/apache/ratis/pull/855#discussion_r1137979082


##########
ratis-server/src/main/java/org/apache/ratis/server/raftlog/segmented/SegmentedRaftLog.java:
##########
@@ -414,7 +414,7 @@ protected CompletableFuture<Long> 
appendEntryImpl(LogEntryProto entry) {
       } else {
         cache.appendEntry(entry, 
LogSegment.Op.WRITE_CACHE_WITHOUT_STATE_MACHINE_CACHE);
       }
-      return writeFuture;
+      return writeFuture.whenComplete((clientReply, exception) -> 
appendEntryTimerContext.stop());

Review Comment:
   @kaijchen , you are right that we should stop the timer asynchronously. i.e.
   ```java
         writeFuture.whenComplete((clientReply, exception) -> 
appendEntryTimerContext.stop());
         return writeFuture;
   ```
   
   @BUAAserein , could you make the change?



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