forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correctly keep master in master history if it was active at the begin…
…ning of the master history period (elastic#86708) This commit fixes a problem with the MasterHistory class. If we have had a single master for a week and then that master went to null 5 seconds ago, we want to say that we have had a non-null master within the last 30 seconds. However before this change, MasterHistory.hasSeenMasterInLastNSeconds(30) would return false in that case because the non-null master had a start time much more than 30 seconds ago. This fix recognizes that a node is master up until the start time of the master that replaces it. This required changing the methods that pruned the master history based on time so that we do not prune masters that are in any way active during the time period.
- Loading branch information
Showing
2 changed files
with
121 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters