OneSizeFitsQuorum commented on code in PR #1207:
URL: https://github.com/apache/ratis/pull/1207#discussion_r1906611012


##########
ratis-server/src/main/java/org/apache/ratis/server/impl/StateMachineUpdater.java:
##########
@@ -216,6 +216,9 @@ private void waitForCommit() throws InterruptedException {
     // Thus it is possible to have applied > committed initially.
     final long applied = getLastAppliedIndex();
     for(; applied >= raftLog.getLastCommittedIndex() && state == State.RUNNING 
&& !shouldStop(); ) {
+      if (server.getSnapshotRequestHandler().getPending().get().isPresent()) {

Review Comment:
   Thanks for the detailed review! Yes, if i do not check it in the for loop as 
the first commit. I should use `shouldTriggerTakingSnapshot` instead



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