Elia-Renzoni commented on code in PR #1612:
URL: https://github.com/apache/ratis/pull/1612#discussion_r4599705765


##########
ratis-server/src/main/java/org/apache/ratis/server/raftlog/RaftLogBase.java:
##########
@@ -125,13 +125,13 @@ public boolean updateCommitIndex(long majorityIndex, long 
currentTerm, boolean i
       final long newCommitIndex = Math.min(majorityIndex, getFlushIndex());
       if (oldCommittedIndex < newCommitIndex) {
         if (!isLeader) {
-          return commitIndex.updateIncreasingly(newCommitIndex, 
traceIndexChange);
+          return commitIndex.updateToMax(newCommitIndex, traceIndexChange);
         }
 
         // Only update last committed index for current term. See ยง5.4.2 in 
paper for details.
         final TermIndex entry = getTermIndex(newCommitIndex);
         if (entry != null && entry.getTerm() == currentTerm) {
-          return commitIndex.updateIncreasingly(newCommitIndex, 
traceIndexChange);
+          return commitIndex.updateToMax(newCommitIndex, traceIndexChange);

Review Comment:
   Fixed here: 8a0adba77fc703d93950fd5f48c73adac0fc96a8



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