Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
storage: avoid deadlock during merges
Merges could deadlock if the lease on the right-hand range was transferred or renewed during the merge transaction and the new leaseholder received any request before the GetSnapshotForMerge request. See cockroachdb#27442 and the comments within for details. Avoid the deadlock by moving the responsibility for waiting for a merge to complete from the replica to the store. Add a unit test that runs several get requests concurrently with several merges to reliably test for regressions. The problem previously only presented when stressing TestStoreRangeMergeWithData. Fix cockroachdb#27442. Release note: None
- Loading branch information