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

kvserver: read lease under mutex when switching lease type #124223

Merged

Commits on May 16, 2024

  1. kvserver: read lease under mutex when switching lease type

    A race could occur when a replica queue and post lease application both
    attempted to switch the lease type. This race would cause the queue to
    not process the replica because the lease type had already changed. As a
    result, lease preference violations might not have been quickly
    resolved by the lease queue.
    
    Read the lease under the same mutex used for requesting the lease, when
    possibly switching the lease type.
    
    Resolves: cockroachdb#123998
    Release note: None
    kvoli committed May 16, 2024
    Configuration menu
    Copy the full SHA
    574f667 View commit details
    Browse the repository at this point in the history