You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "kaijchen (via GitHub)" <gi...@apache.org> on 2023/03/15 09:03:02 UTC

[GitHub] [ratis] kaijchen commented on a diff in pull request #855: RATIS-1816. appendEntryTimer is not accurate due to the return of writeFuture

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


##########
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:
   @szetszwo shall we stop timer sync or async?
   
   This looks like my initial solution for RATIS-1810:
   https://github.com/apache/ratis/compare/da274e6f92bc56dfa7acebdce186ddc05acf6352



-- 
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: issues-unsubscribe@ratis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org