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

release-20.2: sql: lease acquisition of OFFLINE descs may starve bulk operations #63229

Merged
merged 1 commit into from
Apr 9, 2021

Conversation

fqazi
Copy link
Collaborator

@fqazi fqazi commented Apr 7, 2021

Backport 1/1 commits from #62959.

/cc @cockroachdb/release


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)

@fqazi fqazi requested review from ajwerner, a team and miretskiy and removed request for a team April 7, 2021 15:54
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@ajwerner ajwerner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like some proto files got inadvertently updated. Otherwise :lgtm:

Reviewed 3 of 6 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @miretskiy)

@fqazi fqazi force-pushed the backport20.2-62959 branch 4 times, most recently from 6b97774 to ddb96ca Compare April 8, 2021 15:59
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)
@fqazi fqazi force-pushed the backport20.2-62959 branch from ddb96ca to 79b00c9 Compare April 8, 2021 17:19
Copy link
Contributor

@ajwerner ajwerner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @ajwerner and @miretskiy)

@fqazi fqazi merged commit c29ee77 into cockroachdb:release-20.2 Apr 9, 2021
@fqazi fqazi deleted the backport20.2-62959 branch April 9, 2021 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants