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: add timeout for lease acquisitions #81136

Merged
merged 2 commits into from
May 25, 2022

Commits on May 24, 2022

  1. kvserver: deflake TestLeasePreferencesDuringOutage

    This patch deflakes `TestLeasePreferencesDuringOutage` by allowing nodes
    to acquire a lease even when they are not the Raft leader.
    
    Release note: None
    erikgrinaker committed May 24, 2022
    Configuration menu
    Copy the full SHA
    7100ff9 View commit details
    Browse the repository at this point in the history
  2. kvserver: add timeout for lease acquisitions

    This patch adds a timeout for lease acquisitions. It is set to
    twice the Raft election timeout (6 seconds total), since it may need to
    hold a Raft election and repropose the lease acquisition command, each
    of which may take up to one election timeout.
    
    Without this timeout, it's possible for a lease acquisition to stall
    indefinitely (e.g. in the case of a stalled disk). This prevents a
    `NotLeaseHolderError` from being returned to the client DistSender,
    which in turn prevents it from trying other replicas that could acquire
    the lease instead. This can cause a lease to remain invalid forever.
    
    Release note (bug fix): Fixed a bug where an unresponsive node (e.g.
    with a stalled disk) could prevent other nodes from acquiring its
    leases, effectively stalling these ranges until the node was shut down
    or recovered.
    erikgrinaker committed May 24, 2022
    Configuration menu
    Copy the full SHA
    ab74b97 View commit details
    Browse the repository at this point in the history