Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
storage: check for conflicting replicated locks in mvccPutInternal
Fixes cockroachdb#109647. Informs cockroachdb#100193. This commit uses the `lockTableKeyScanner` introduced in cockroachdb#110323 to scan for conflicting replicated locks at the same time as we can for intents (the writer's or others') when performing mutations in mvccPutInternal. In doing so, the commit removes use of `intentInterleavingIter` on the mutation path, opting for the explicit scan of the lock table instead. Use of the lockTableKeyScanner to both check for conflicting locks and to scan for intents ensures that in the common case where there are no locks on a key, we only perform one (prefix) seek. This should avoid any regression. I'll collect some benchmark results to verify that this reasoning holds and that this does not cause a performance regression for write-heavy workloads. Release note: None
- Loading branch information