errose28 commented on pull request #420: URL: https://github.com/apache/incubator-ratis/pull/420#issuecomment-774850829
The added integration test `InstallSnapshotNotificationTests#testInstallSnapshotNotificationCount` shows two log lines from the leader (s2 in this example): ```log [s2@group-DF2C3007074F-SegmentedRaftLogWorker] INFO RaftServer$Division (ServerState.java:close(405)) - s2@group-DF2C3007074F: closes. applyIndex: 20 [s2@group-DF2C3007074F-SegmentedRaftLogWorker] INFO segmented.SegmentedRaftLogWorker (SegmentedRaftLogWorker.java:close(236)) - s2@group-DF2C3007074F-SegmentedRaftLogWorker close() ``` When it tries to add two new nodes to the cluster later in the test, `RaftServerTestUtil#waitAndCheckNewConf` fails because s2 thinks it is the leader, but it is closed so the rest of the cluster has elected a new leader, and the check deems the configuration unstable. It looks like s2 could have closed because of the `java.lang.IllegalStateException: lastWrittenIndex == 19, entry == term: 2 index: 21` which occurred on s2 when trying to push the new configuration. This is probably due to how the logs are being truncated and purged, but I have not found the exact cause. ---------------------------------------------------------------- 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: [email protected]
