RATIS-2045. SnapshotInstallationHandler doesn't notify follower when snapshotIndex is -1 and firstAvailableLogIndex is 0#1053
Conversation
|
@duongkame , there are some test failures related to |
I created a custom build with advance detection here: https://github.com/duongkame/ratis/actions/runs/8351812136 Looks like this is because the retained log entries in SimpleStateMachine4Testing cache are not released. Probably because the state machine is not closed. Filed RATIS-2046. |
…otInstallationHandler.java
…otInstallationHandler.java
| } No newline at end of file | ||
| } |
There was a problem hiding this comment.
@hemantk-12 , could you revert this whitespace change? I tried to do in on the GitHub web ui but it did not work.
…snapshotIndex is -1 and firstAvailableLogIndex is 0 (apache#1053)
…er when snapshotIndex is -1 and firstAvailableLogIndex is 0 (apache#1053)" This reverts commit 72c060d.
…er when snapshotIndex is -1 and firstAvailableLogIndex is 0 (apache#1053)" This reverts commit 72c060d.
…er when snapshotIndex is -1 and firstAvailableLogIndex is 0 (apache#1053)" This reverts commit 72c060d.
…er when snapshotIndex is -1 and firstAvailableLogIndex is 0 (apache#1053)" This reverts commit 72c060d.
…er when snapshotIndex is -1 and firstAvailableLogIndex is 0 (apache#1053)" This reverts commit 72c060d.
…snapshotIndex is -1 and firstAvailableLogIndex is 0 (apache#1053)
…snapshotIndex is -1 and firstAvailableLogIndex is 0 (apache#1053)
…snapshotIndex is -1 and firstAvailableLogIndex is 0 (apache#1053)
What changes were proposed in this pull request?
When the leader has firstAvailableLogIndex
0and the follower node is bootstrapping and doesn't have any snapshot, the leader doesn't notify the follower to install the snapshot because the current condition is alwaystrueifsnapshotIndexis-1(default value) andfirstAvailableLogIndexis0(when the leader has logs form 0th index).As part of this change, we are changing the condition to notify when
snapshotIndexis-1. IfsnapshotIndexis not-1, then continue withsnapshotIndex + 1 >= firstAvailableLogIndex && firstAvailableLogIndex > INVALID_LOG_INDEX.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/RATIS-2045
How was this patch tested?
Existing unit tests for now.