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.
catalog/lease: reduce lock contention on descVersionState
Recently, a regression was noticed on master related to AcquireByName being slower between builds. Using a profiler, this was tracked down to contention on descriptorVersionState's mutex. To address this, this patch avoids acquiring this lock twice in the hot path, which resolves the regression. After: BenchmarkLeaseAcquireByNameCached-24 2378610 451.9 ns/op Before: BenchmarkLeaseAcquireByNameCached-24 1493899 727.9 ns/op f13c021: BenchmarkLeaseAcquireByNameCached-24 2129446 568.1 ns/op Fixes: cockroachdb#111094 Release note: None
- Loading branch information
Showing
3 changed files
with
22 additions
and
21 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