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

util/quotapool: add WithMinimumWait option to RateLimiter #55769

Merged
merged 1 commit into from
Oct 23, 2020

Conversation

ajwerner
Copy link
Contributor

This is handy to ensure that the rate limiter does not become a bottleneck
in the face of many small acquisitions.

Release note: None

This is handy to ensure that the rate limiter does not become a bottleneck
in the face of many small acquisitions.

Release note: None
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@ajwerner
Copy link
Contributor Author

@lunevalex even though the quotapool impl in our util package should be more efficient due to pooling, setting timers for nanoseconds of waiting is unlikely to be efficient no matter how you do it. This should make it trivially easy to ensure that we do some amortizing of the waiting without making the client code any uglier.

@lunevalex lunevalex self-requested a review October 23, 2020 16:55
@lunevalex
Copy link
Collaborator

LGTM, thank you.

@ajwerner
Copy link
Contributor Author

TFTR!

bors r=lunevalex

@craig
Copy link
Contributor

craig bot commented Oct 23, 2020

Build succeeded:

@craig craig bot merged commit b27e844 into cockroachdb:master Oct 23, 2020
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