hemantk-12 opened a new pull request, #1053: URL: https://github.com/apache/ratis/pull/1053
## What changes were proposed in this pull request? When the leader has firstAvailableLogIndex `0` and 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](https://github.com/apache/ratis/blob/44a4f1fb73a073589a4563d492f6acfc68ce4a5d/ratis-server/src/main/java/org/apache/ratis/server/impl/SnapshotInstallationHandler.java#L224) is always `true` if `snapshotIndex` is `-1` (default value) and `firstAvailableLogIndex` is `0` (when the leader has logs form 0th index). As part of this change, we are changing the condition to notify when `snapshotIndex` is `-1`. If `snapshotIndex` is not `-1`, then continue with `snapshotIndex + 1 >= firstAvailableLogIndex && firstAvailableLogIndex > INVALID_LOG_INDEX`. ## How was this patch tested? Existing unit tests for now. -- 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]
