Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

catalog/lease: reduce lock contention on descVersionState #111397

Merged
merged 1 commit into from
Oct 2, 2023

Commits on Sep 28, 2023

  1. 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
    fqazi committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    318b193 View commit details
    Browse the repository at this point in the history