-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
sql: Improve observability of paused TTL deletion jobs #80122
Comments
Should be "easy" - we should call the code to PAUSE/UNPAUSE the schedule here: cockroach/pkg/sql/paramparse/paramobserver.go Line 397 in ecb24ef
The challenge is if ttl_pause and a ttl is set at the same time, but perhaps we could block that interaction.
i think this is a misunderstanding of "command" column - it's meta arguments for the scheduled job to start up a job and doesn't show anything to do with functionality of it. We shouldn't do this.
I would argue we should only support the latter, but not too fussed. i'm thinking this is lower pri, but lmk if you think otherwise. |
docs for scheduled backups seem to show the user functionality. I'm ok with this being lower priority and bundled with the full support Epic |
re: the command column, in the case of scheduled backups, it shows the command used to start the backup job. but the request here is to show the selects/deletes that the TTL job is running. i'd agree with oliver that this isn't appropriate to show in SHOW SCHEDULES output. also, not even sure what we would show, since the TTL job can run dozens/hundreds of queries depending on how much data it has to delete, and we won't know what those are until after the job is already running. (those queries aren't known at the time of setting up the schedule) |
Another challenge with this is if |
A user already can use So that means that we currently have two different ways of pausing a TTL job: If we did make them start affecting each other, I think it might even be more confusing... |
Another approach could be to set the ttl_cron to "never" (if that's allowed), and get rid of the ttl_pause option. |
To pause TTL deletion of expired rows, a use can execute
alter table promo_codes set (ttl_pause = true);
or
SET CLUSTER SETTING sql.ttl.job.enabled = false
When TTL deletion is paused, this is the output of
SHOW SCHEDULES
Desired behavior
schedule_status
should bePAUSED
similar to backup scheduled. In addition paused, scheduled backups shownext_run = NULL
. It seems ok that TTL deletion jobs deviate from scheduled backups since we start/fail the job if TTL is paused.command
column should show the select/delete statements executed by the deletion jobALTER TABLE...SET (TTL_PAUSE = TRUE)
Epic CRDB-18322
Jira issue: CRDB-15839
The text was updated successfully, but these errors were encountered: