-
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.
60905: kv: reject lease transfers during in-progress range merge r=nvanbenschoten a=nvanbenschoten Found with kvnemesis's new ability to issue lease transfers. This commit prevents TransferLease requests from waiting on in-progress merges, instead rejecting them in `handleMergeInProgressError`. This is necessary because the merge may need to acquire a range lease in order to complete if it still needs to perform its Subsume request, which it likely will if this lease transfer revoked the leaseholder's existing range lease. Any concurrent lease acquisition attempt will be blocked on this lease transfer because a replica only performs a single lease operation at a time, so we reject to prevent a deadlock. The commit adds a new `TestStoreRangeMergeRHSLeaseTransfers` test which reliably hit this deadlock before the issue was fixed. Release note (bug fix): Fixes a rare deadlock where a series of lease transfers concurrent with a Range merge could block each other from ever completing. Release justification: bug fix Co-authored-by: Nathan VanBenschoten <[email protected]>
- Loading branch information
Showing
4 changed files
with
125 additions
and
38 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