-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
schedules: Schedule Control #51600
Comments
Is the If we don't support Do we have a row TTL on the schedules table a-la-Jobs table? |
No, WITH job_command is optional, and the default is do nothing. If there are running jobs, they will continue running. Removal can be done simply with No ttl on schedules |
Makes sense re: default -- we just need to know what to doc. re: |
I don't know ... re delete. PAUSE JOBS SELECT job_id FROM [SHOW JOBS WHERE].... Or, alternatively, do we want a more restrictive API where the users can only work on 1 schedule at a time and they have to specify schedule id? |
I think we should offer |
I was just chatting re Should we offer On the other hand -- looking at job control, these statements return # of rows effected (not the actual rows) -- which |
Yes, I plan on supporting same thing as we support for job control |
Yeah -- I wish job control didn't do it and returned actual rows. However, if you think of job control stuff as just update statement of sort, then it makes sense that we only return |
I'm going to hold off on implement For now -- going to support basic PAUSE/RESUME/DROP only. |
IMO I think that's sufficient. Users can cancel jobs on their own if need be for v1. IMO there's higher impact work elsewhere to do rn. Thanks for the hard work / thinking here. |
51562: backupccl: add RestoreData processor r=dt a=pbardea This commit adds a processor which actually performs the ImportRequest. It has an input which accepts rows with 2 columns that should be sent from SplitAndScatter processors. Each row represents one span that the processor should ingest. The intention is that the spans direcected to a processor on a given node have their leaseholder colocated on the same node (this work is done in the SplitAndScatter processor). All that remains is to send a request to ingest the data and stream back its progress to the coordinator upon completion. Part of #40239. Release note: None 51896: builkio: Add schedule control statements. r=miretskiy a=miretskiy Informs #51600 Introduce schedule control statements responsible for managing scheduled jobs. ``` PAUSE SCHEDULE 123 PAUSE SCHEDULES SELECT ... RESUME SCHEDULES SELECT schedule_id FROM system.schedules_jobs ... DROP SCHEDULE 123 ``` Release Notes (enterprise): Implement schedule control statements to pause, resume, or delete scheduled jobs. Co-authored-by: Paul Bardea <pbardea@gmail.com> Co-authored-by: Yevgeniy Miretskiy <yevgeniy@cockroachlabs.com>
Also encapsulates jobs control example: |
52038: jobs: Implement job control for schedules. r=miretskiy a=miretskiy Informs #51600 Add a `FOR SCHEDULES` clause to job control statements to enable control over jobs created by the scheduled jobs. ``` PAUSE JOBS FOR SCHEDULE 123 RESUME JOBS FOR SCHEDULES (SELECT schedule_id ....) CANCEL JOBS FOR SCHEDULE 321 ``` Release Notes (enterprise change): Add `FOR SCHEDULES` clause to the job control statements to enable management of the jobs created by schedules. Co-authored-by: Yevgeniy Miretskiy <yevgeniy@cockroachlabs.com>
51865: sql: use the descs.Collection to access types during distributed flows r=rohany a=rohany This commit enables distributed queries to access user defined type metadata during flow setup via the lease manager, so that accesses to this metadata is cached and doesn't have to go through k/v on every access. This is achieved by giving the `FlowContext` a `descs.Collection` is used to access the descriptors through the lease manager. Release note: None 51939: interval/generic: improve randomized testing, fix upper bound bug r=nvanbenschoten a=nvanbenschoten In an effort to track down the bug that triggered #51913, this commit ports the randomized interval btree benchmarks to also be unit tests. This allows us to run invariant checks (see `btree.Verify`) on randomized tree configurations. Doing so revealed a violation of the `isUpperBoundCorrect` invariant. This was determined to be a bug in `node.removeMax`. When removing an item from a grandchild node, we were failing to adjust the upper bound of the child node. It doesn't look like this could cause user-visible effects because the upper bound of a subtree is only ever decreased on removal, so at worst, this caused searches in the tree to do more work than strictly necessary. Still, this is a good bug to fix and it's encouraging that the new randomized testing using the existing invariant validation caught it. 52090: sql: support ALTER TABLE SET SCHEMA command r=rohany a=RichardJCai sql: support ALTER TABLE SET SCHEMA command Release note (sql change): Added support for ALTER TABLE/SEQUENCE/VIEW SET SCHEMA to set the schema of the table to the target schema. One must have DROP privilege on the table and CREATE privilege on the schema to perform the operation. 52230: bulkio: Implement `SHOW SCHEDULES` r=miretskiy a=miretskiy Informs #51850 Informs #51600 Implement `SHOW SCHEDULES` statemen which displays the information on scheduled jobs. Display schedule information, optionally filtered by schedule state (paused or not) and optionally restricted just to the backup schedules: ``` SHOW [RUNNING|PAUSED] SCHEDULES [FOR BACKUP] ``` In addition, it is possible to display information for a specific schedule: ``` SHOW SCHEDULE 123 ``` Release Notes (enterprise change): `SHOW SCHEDULES` displays information about the scheduled jobs. Co-authored-by: Rohan Yadav <rohany@alumni.cmu.edu> Co-authored-by: Nathan VanBenschoten <nvanbenschoten@gmail.com> Co-authored-by: richardjcai <caioftherichard@gmail.com> Co-authored-by: Yevgeniy Miretskiy <yevgeniy@cockroachlabs.com>
Implement schedule control statements.
Informs #28266
Similar to how operators can control jobs (PAUSE JOB, RESUME JOB), we need a way to
control schedules.
Schedule control statements look like:
<COMMAND> SCHEDULE(s) <schedule_selector> WITH <job_command> JOBS
Command: is one of PAUSE or RESUME.
schedule_selector: same as jobs selector -- either a list of schedule ids, or a select statement returning schedule ids.
The
WITH <job_command>
specifies the job command for the jobs managed by this schedule.PAUSE SCHEDULE 213 WITH CANCEL JOBS
RESUME SCHEDULES SELECT schedule_id FROM system.scheduled_jobs WHERE owner='blah'
It's not clear (yet) if we should support
CANCEL SCHEDULES
. Is cancel == delete? Then, just delete the schedule.On the other hand, what if we want to cancel jobs before we delete the schedule? @dt @mwang1026
The text was updated successfully, but these errors were encountered: