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

ttljob: implement a delete based rate limit #76615

Merged
merged 1 commit into from
Feb 21, 2022

Conversation

otan
Copy link
Contributor

@otan otan commented Feb 15, 2022

(only last commit matters)

This commit introduces a delete based rate limit for TTL. It can be
configured by the ttl_delete_rate_limit storage parameter, but
defaults to the value in sql.ttl.default_delete_rate_limit (if zero,
assume no rate limit).

Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@otan otan mentioned this pull request Feb 15, 2022
30 tasks
@otan otan requested a review from rafiss February 16, 2022 05:45
@otan otan force-pushed the rate_limit branch 3 times, most recently from 0ce7660 to 9eaf2d5 Compare February 17, 2022 10:04
@otan otan marked this pull request as ready for review February 17, 2022 10:05
@otan otan requested a review from a team February 17, 2022 10:05
@@ -149,6 +158,12 @@ func (t rowLevelTTLResumer) Resume(ctx context.Context, execCtx interface{}) err
rangeConcurrency := getRangeConcurrency(p.ExecCfg().SV(), ttlSettings)
selectBatchSize := getSelectBatchSize(p.ExecCfg().SV(), ttlSettings)
deleteBatchSize := getDeleteBatchSize(p.ExecCfg().SV(), ttlSettings)
deleteRateLimit := getDeleteRateLimit(p.ExecCfg().SV(), ttlSettings)
deleteRateLimiter := quotapool.NewRateLimiter(
"ttl",
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: maybe ttl-delete

This commit introduces a delete based rate limit for TTL. It can be
configured by the `ttl_delete_rate_limit` storage parameter, but
defaults to the value in `sql.ttl.default_delete_rate_limit` (if zero,
assume no rate limit).

Release note: None
@otan
Copy link
Contributor Author

otan commented Feb 18, 2022

done!

bors r=rafiss

@craig
Copy link
Contributor

craig bot commented Feb 18, 2022

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Feb 18, 2022

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Feb 18, 2022

Build failed:

@otan
Copy link
Contributor Author

otan commented Feb 18, 2022

bors r=rafiss

@craig
Copy link
Contributor

craig bot commented Feb 18, 2022

Build failed:

@otan
Copy link
Contributor Author

otan commented Feb 20, 2022

bors r=rafiss

@craig
Copy link
Contributor

craig bot commented Feb 21, 2022

Build succeeded:

@craig craig bot merged commit f577b7b into cockroachdb:master Feb 21, 2022
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