You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by GitBox <gi...@apache.org> on 2021/02/10 09:57:51 UTC

[GitHub] [incubator-ratis] szetszwo commented on pull request #420: RATIS-1305. Leader stuck in infinite install snapshot cycle when logs have been purged

szetszwo commented on pull request #420:
URL: https://github.com/apache/incubator-ratis/pull/420#issuecomment-776590929


   @errose28 , I just have tried the test.  The two new servers, s3 and s4, have failed to start due to "Unexpected gap in segments" as shown below.  It seems the changes might have some bug.
   ```
   2021-02-10 15:32:49,699 [s4@group-9F91CFE6147C-StateMachineUpdater] ERROR impl.StateMachineUpdater (StateMachineUpdater.java:run(189)) - s4@group-9F91CFE6147C-StateMachineUpdater caught a Throwable.
   java.lang.IllegalStateException: Unexpected gap in segments: binarySearch(20) returns -1, segments=[log-21_21]
   	at org.apache.ratis.server.raftlog.segmented.SegmentedRaftLogCache$LogSegmentList.purge(SegmentedRaftLogCache.java:340)
   	at org.apache.ratis.server.raftlog.segmented.SegmentedRaftLogCache.purge(SegmentedRaftLogCache.java:559)
   	at org.apache.ratis.server.raftlog.segmented.SegmentedRaftLog.purgeImpl(SegmentedRaftLog.java:362)
   	at org.apache.ratis.server.raftlog.RaftLogBase.purge(RaftLogBase.java:307)
   	at org.apache.ratis.server.impl.StateMachineUpdater.takeSnapshot(StateMachineUpdater.java:292)
   	at org.apache.ratis.server.impl.StateMachineUpdater.checkAndTakeSnapshot(StateMachineUpdater.java:255)
   	at org.apache.ratis.server.impl.StateMachineUpdater.run(StateMachineUpdater.java:178)
   	at java.lang.Thread.run(Thread.java:748)
   2021-02-10 15:32:49,699 [s3@group-9F91CFE6147C-StateMachineUpdater] ERROR impl.StateMachineUpdater (StateMachineUpdater.java:run(189)) - s3@group-9F91CFE6147C-StateMachineUpdater caught a Throwable.
   java.lang.IllegalStateException: Unexpected gap in segments: binarySearch(20) returns -1, segments=[log-21_21]
   	at org.apache.ratis.server.raftlog.segmented.SegmentedRaftLogCache$LogSegmentList.purge(SegmentedRaftLogCache.java:340)
   	at org.apache.ratis.server.raftlog.segmented.SegmentedRaftLogCache.purge(SegmentedRaftLogCache.java:559)
   	at org.apache.ratis.server.raftlog.segmented.SegmentedRaftLog.purgeImpl(SegmentedRaftLog.java:362)
   	at org.apache.ratis.server.raftlog.RaftLogBase.purge(RaftLogBase.java:307)
   	at org.apache.ratis.server.impl.StateMachineUpdater.takeSnapshot(StateMachineUpdater.java:292)
   	at org.apache.ratis.server.impl.StateMachineUpdater.checkAndTakeSnapshot(StateMachineUpdater.java:255)
   	at org.apache.ratis.server.impl.StateMachineUpdater.run(StateMachineUpdater.java:178)
   	at java.lang.Thread.run(Thread.java:748)
   ```


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

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