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: allow expired leases to quiesce
Previously, a range would only quiesce if it had a valid leaseholder colocated with the Raft leader. However, there's no reason to not quiesce expired leases as well -- in particular, if we enable use of expiration-based leases for all ranges, idle ranges would let their leases expire but wouldn't then be eligible for quiesence. This patch allows ranges with expired leases to quiesce. A replica only quiesces if it believes itself to be the leader and has no unapplied log entries, in which case there's no lease elsewhere. If there's a newer leader then only replicas still on the older term will be quiesced, and these will unquiesce when they hear from the new leader. It additionally allows quiescing in a couple of other cases where the replica has a current lease that it can't use (i.e. `UNUSABLE` and `PROSCRIBED`). Epic: none Release note: None
- Loading branch information
1 parent
e882d50
commit 76afb00
Showing
2 changed files
with
99 additions
and
13 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