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: don't apply quota pool to lease requests #104026

Merged
merged 1 commit into from
May 30, 2023

Conversation

erikgrinaker
Copy link
Contributor

@erikgrinaker erikgrinaker commented May 28, 2023

Lease requests and transfers are latency sensitive and small, so we allow them to bypass the quota pool. This is particularly important for expiration lease extensions, which happen every 3 seconds.

During TPCC imports, the quota pool was often found to delay lease requests by as much as 3 seconds.

Resolves #98124.

Epic: none
Release note: None

@erikgrinaker erikgrinaker self-assigned this May 28, 2023
@erikgrinaker erikgrinaker requested a review from a team May 28, 2023 20:29
@blathers-crl
Copy link

blathers-crl bot commented May 28, 2023

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@erikgrinaker erikgrinaker added the backport-23.1.x Flags PRs that need to be backported to 23.1 label May 28, 2023
Lease requests and transfers are latency sensitive and small, so we
allow them to bypass the quota pool. This is particularly important for
expiration lease extensions, which happen every 3 seconds.

During TPCC imports, the quota pool was often found to delay lease
requests by as much as 3 seconds.

Epic: none
Release note: None
@erikgrinaker
Copy link
Contributor Author

Ran a TPCC import with this, and didn't see any lease requests take much more than a second end-to-end except for reproposals during leader changes (#104024). Previously, I often saw delays of 3 seconds or more, sufficient for the range to lose its lease. So this seems fairly effective.

@erikgrinaker
Copy link
Contributor Author

bors r+

@erikgrinaker
Copy link
Contributor Author

erikgrinaker commented May 30, 2023

@irfansharif We'll want to do something similar with replication AC, and let lease requests through as soon as possible. Can you add that to #98308 or a follow-up PR? I'm not sure how relevant it is, since lease requests are often sent directly to the replica and bypass a lot of the store AC and such (lease transfers still go via the store though).

@craig
Copy link
Contributor

craig bot commented May 30, 2023

Build succeeded:

@craig craig bot merged commit 2a7427c into cockroachdb:master May 30, 2023
@erikgrinaker erikgrinaker deleted the proposal-buf-lease branch May 30, 2023 12:16
@irfansharif
Copy link
Contributor

I'm not sure how relevant it is, since lease requests are often sent directly to the replica and bypass a lot of the store AC and such (lease transfers still go via the store though).

Still relevant. Added to #104154.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-23.1.x Flags PRs that need to be backported to 23.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kvserver: prioritize lease requests through Raft
4 participants