-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
sql: lease acquisition of OFFLINE descs may starve bulk operations #62959
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 5 files at r1.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @fqazi and @pbardea)
pkg/sql/catalog/lease/lease.go, line 1418 at r1 (raw file):
err2 := m.Release(desc) if err2 != nil {
nit: I'd prefere releaseErr
to err2
bors r=ajwerner |
Build failed: |
bors r- |
Fixes: cockroachdb#61798 Previously, offline descriptors would never have their leases cached and they would be released once the reference count hit zero. This was inadequate because when attempting to online these tables again the lease acquisition could be pushed back by other operations, leading to starvation / live locks. To address this, this patch will allow the leases of offline descriptors to be cached. Release note (bug fix): Lease acquisitions of descriptor in a offline state may starve out bulk operations (backup / restore)
bors r=ajwerner |
Build failed (retrying...): |
Build succeeded: |
this one may need a backport on the 21.1 branch as well |
Fixes: #61798
Previously, offline descriptors would never have their leases
cached and they would be released once the reference count hit zero.
This was inadequate because when attempting to online these tables
again the lease acquisition could be pushed back by other operations,
leading to starvation / live locks. To address this, this patch will
allow the leases of offline descriptors to be cached.
Release note (bug fix): Lease acquisitions of descriptor in a
offline state may starve out bulk operations (backup / restore)