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-23.2: ttljob: introduce sql.ttl.default_select_rate_limit cluster setting, ttl_select_rate_limit storage param #115801

Merged
merged 3 commits into from Dec 8, 2023

Conversation

rafiss
Copy link
Collaborator

@rafiss rafiss commented Dec 7, 2023

Backport 3/3 commits from #112119.

/cc @cockroachdb/release

Release justification: important feature that can't be backported later


Fixes #110742

Add sql.ttl.default_select_rate_limit cluster setting and ttl_select_rate_limit table storage param to set TTL select rate limit. This sets the number of records per table per second per node that can be selected by the TTL job.

These structs contain parameters for SelectQueryBuilder and
DeleteQueryBuilder. The *Params structs reduce number of params
that need to be kept in sync between the Make*QueryBuilder functions
and the *QueryBuilder structs.

Release note: None
…eryBounds

By creating these structs at a higher level and passing them into
runTTLOnQueryBounds, runTTLOnQueryBounds needs fewer params to create
these structs itself.

Release note: None
…ttl_select_rate_limit storage param

Fixes cockroachdb#110742

Release note (sql change): Add sql.ttl.default_select_rate_limit
cluster setting and ttl_select_rate_limit table storage param
to set TTL select rate limit. This sets the number of records per
table per second per node that can be selected by the TTL job.
@rafiss rafiss requested a review from fqazi December 7, 2023 19:11
@rafiss rafiss requested review from a team as code owners December 7, 2023 19:11
@rafiss rafiss requested review from rharding6373 and removed request for a team December 7, 2023 19:11
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@rafiss rafiss changed the title ttl: add SelectQueryParams, DeleteQueryParams structs ttljob: introduce sql.ttl.default_select_rate_limit cluster setting, ttl_select_rate_limit storage param Dec 7, 2023
@rafiss rafiss changed the title ttljob: introduce sql.ttl.default_select_rate_limit cluster setting, ttl_select_rate_limit storage param release-23.2: ttljob: introduce sql.ttl.default_select_rate_limit cluster setting, ttl_select_rate_limit storage param Dec 7, 2023
Copy link
Collaborator

@andyyang890 andyyang890 left a comment

Choose a reason for hiding this comment

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

LGTM! Just had one question.


aostDuration := ttlSpec.AOSTDuration
if aostDuration == 0 {
// Read AOST in case of mixed 22.2.0/22.2.1+ cluster where the job started on a 22.2.0 node.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same question as on the release-23.2.0-rc backport PR, should this code remain based on #101119 (review)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good question, but no, we decided not to support version skipping from 22.2 directly to 23.2: cockroachlabs.slack.com/archives/C05B1BPMJLE/p1696908185131109?thread_ts=1696898969.397849&cid=C05B1BPMJLE

@rafiss rafiss merged commit d2c0cfa into cockroachdb:release-23.2 Dec 8, 2023
5 of 6 checks passed
@rafiss rafiss deleted the backport23.2-112119 branch December 13, 2023 19:59
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.

None yet

4 participants