-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
server,kvserver: wait for liveness record refresh on other nodes at t…
…he end of drain Prior to this patch, it was possible for a node to shut down gracefully "too quickly", before the other nodes got a chance to see that the node has gone away. In particular it was possible: - while the node was pushing leases away, it was possible for the other nodes with replicas on shared ranges to push them back (store rebalance / allocator). This is because the other nodes did not yet have a copy of the updated node descriptor marked "draining". - after the node had moved its leases away and stopped, it was possible for range caches on other nodes to continue to try to use replicas on the drained node. To alleviate both issues, this commit makes the drain process wait until the expiry deadline on the draining nodes' liveness, plus 5 seconds, before starting to transfer leases away. This way, there is confidence during the lease transfer that the other nodes know the draining node is, in fact, draining, and will not be considered as a transfer target. Additionally, an additional wait of 5 seconds is added at the very end after all leases have transferred, so that if another node still finds itself wanting to address a replica on the now-drained node, it gets a chance to get a NodeLeaseHolderError and a redirect to the new leaseholder. Release note: None
- Loading branch information
Showing
3 changed files
with
206 additions
and
44 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
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