forked from cockroachdb/cockroach
-
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.
kvserver: always transfer expiration-based leases
Fixes cockroachdb#81764. In addition to ranges that unconditionally require expiration-based leases (node liveness and earlier), we also use them during lease transfers for all other ranges. After acquiring such expiration-based leases, the leaseholders are expected to soon upgrade them to the more efficient epoch-based ones. By transferring an expiration-based lease, we can limit the effect of an ill-advised lease transfer since the in coming leaseholder needs to recognize itself as such within a few seconds; if it doesn't (we accidentally sent the lease to a replica in need of a snapshot), the lease is up for grabs. If we simply transferred epoch based leases, it would be possible for the new leaseholder in need of a snapshot to maintain its lease if the node it was on is able to heartbeat its liveness record. Release note: None.
- Loading branch information
1 parent
d7cf6d2
commit b47f808
Showing
6 changed files
with
111 additions
and
20 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