Skip to content

Commit

Permalink
Revert "RATIS-2045. SnapshotInstallationHandler doesn't notify follow…
Browse files Browse the repository at this point in the history
…er when snapshotIndex is -1 and firstAvailableLogIndex is 0 (apache#1053)"

This reverts commit 72c060d.
  • Loading branch information
szetszwo committed Apr 15, 2024
1 parent 8d85d2a commit f8b1692
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,7 @@ private InstallSnapshotReplyProto notifyStateMachineToInstallSnapshot(
// Check if snapshot index is already at par or ahead of the first
// available log index of the Leader.
final long snapshotIndex = state.getLog().getSnapshotIndex();
if (snapshotIndex != INVALID_LOG_INDEX && snapshotIndex + 1 >= firstAvailableLogIndex &&
firstAvailableLogIndex > INVALID_LOG_INDEX) {
if (snapshotIndex + 1 >= firstAvailableLogIndex && firstAvailableLogIndex > INVALID_LOG_INDEX) {
// State Machine has already installed the snapshot. Return the
// latest snapshot index to the Leader.

Expand Down

0 comments on commit f8b1692

Please sign in to comment.