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 #81788

Closed
lunevalex opened this issue May 24, 2022 · 0 comments · Fixed by #81136
Closed

kvserver: add timeout for lease acquisitions #81788

lunevalex opened this issue May 24, 2022 · 0 comments · Fixed by #81136
Assignees
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

Comments

@lunevalex
Copy link
Collaborator

lunevalex commented May 24, 2022

Lease acquisitions should have a timeout. It should be 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.

Jira issue: CRDB-16080

@lunevalex lunevalex added the C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. label May 24, 2022
@lunevalex lunevalex linked a pull request May 24, 2022 that will close this issue
@craig craig bot closed this as completed in #81136 May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants