-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kvserver: modernize AdminRelocateRange
Previously, `AdminRelocateRange`'s contract was to transfer the lease away to the first voting replica in the input slice of targets. However, this was mostly a result of the fact that leaseholder replicas weren't allowed to remove themselves. Thus, the caller had to specifically tell `AdminRelocateRange` where it wanted the lease to be, and the `AdminRelocateRange` logic would ensure to transfer the lease away to this replica either before it removed the leaseholder or after it was done performing all the replica relocations. There are two internal callers of `AdminRelocateRange`, and this property of the `AdminRelocateRange` API is unfortunate for both of them. 1. The merge queue takes extra effort to avoid a lease transfer when calling into `AdminRelocateRange`. 2. The store rebalancer performs a lease transfer based on very naive logic that is not optimal. With #74077, leaseholder replicas will be able to remove themselves by transferring the lease away to a suitable replica after they enter the joint configuration of the replication change. This patch makes it such that, going forward, `AdminRelocateRange` will only perform an explicit lease transfer if the caller specifically asks for it. The patch also contains a migration path for this functionality. Once #74077 lands, a future patch will change the store rebalancer and the merge queue behavior to leverage this new functionality. Release note: None
- Loading branch information
1 parent
323988f
commit 6525423
Showing
11 changed files
with
158 additions
and
25 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
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
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
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