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

backport-2.1: server: add a configuration to enable GC of system.rangelog #31328

Closed
wants to merge 3 commits into from

Conversation

tbg
Copy link
Member

@tbg tbg commented Oct 12, 2018

Backport 1/1 commits from #30913.

This doesn't have to be in 2.1, and it hasn't baked particularly long, so I'm open to not backporting this (though I think it's a useful feature and due to the kill switch it can be disarmed)

Maybe we should backport this with a TTLs of zero (disabled)?

/cc @cockroachdb/release


system.rangelog table currently grows unboundedly. The rate of
growth is slow (as long as there is no replica rebalancing
thrashing), but it can still become a problem in long running
clusters.

This commit adds cluster settings to specify interval and TTL
for rows in system.rangelog.
By default, TTL of system.rangelog is set to 30 days.

Fixes #21260

Release note: Add configuration to enable GC of system.rangelog

@tbg tbg requested review from bdarnell and a team October 12, 2018 21:33
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@bdarnell
Copy link
Contributor

I don't think we should have this on by default in 2.1. Either leave it for 2.2 or backport it with the default changed to 0.

tbg and others added 3 commits October 17, 2018 10:01
system.rangelog table currently grows unboundedly. The rate of
growth is slow (as long as there is no replica rebalancing
thrashing), but it can still become a problem in long running
clusters.

This commit adds cluster settings to specify interval and TTL
for rows in system.rangelog.
By default, TTL of system.rangelog is set to 30 days, and that
for system.eventlog to 90 days.

Fixes cockroachdb#21260.

Release note (sql change): the range log and system events logs will
automatically purge records older than 30 and 90 days, respectively.
This can be adjusted via the server.rangelog.ttl and server.eventlog.ttl
cluster settings.
Using transaction timstamp can lead to flaky tests.
Use constant timestamps while inserting events in rangelog
gc test.

Fixes cockroachdb#31371.

Release note: None
It's too late in the cycle to have these on by default (in release-2.1),
but they're good to have in our back pockets.

Release note: None
@tbg
Copy link
Member Author

tbg commented Oct 17, 2018

Updated, PTAL.

@bdarnell
Copy link
Contributor

LGTM, but now that RC1 has been cut I don't feel comfortable adding this at this point. Maybe in a patch release, but I think I'd prefer waiting for 2.2.

@tbg
Copy link
Member Author

tbg commented Oct 17, 2018

Ack.

@tbg tbg closed this Oct 17, 2018
@tbg tbg deleted the backport2.1-30913 branch October 17, 2018 15: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.

3 participants