ChenSammi commented on code in PR #1439:
URL: https://github.com/apache/ratis/pull/1439#discussion_r3145146332


##########
ratis-server/src/main/java/org/apache/ratis/server/raftlog/segmented/SegmentedRaftLog.java:
##########
@@ -264,15 +264,13 @@ private void loadLogSegments(long lastIndexInSnapshot,
         }
       }
 
-      // if the largest index is smaller than the last index in snapshot, we do
-      // not load the log to avoid holes between log segments. This may happen
-      // when the local I/O worker is too slow to persist log (slower than
-      // committing the log and taking snapshot)
+      // If the end index is smaller than lastIndexInSnapshot, it means the 
state machine state is inconsistent
+      // with raft log state, fail the RaftServerImpl.start() to keep the 
state untacked.

Review Comment:
   @szetszwo , above is exactly the case as what I saw.  For this snapshot 1000 
but log 500 case, current ratis will still start the RaftServer, which I think 
is not a good choice.   
   For Ozone's case, it leads to OM shutdown due to 
"java.lang.IllegalStateException: gap between entry term"  , 
https://issues.apache.org/jira/browse/HDDS-15103.  Do you have any better 
suggestion for the fix solution? 



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