-
Notifications
You must be signed in to change notification settings - Fork 4.1k
jobs: batch job creation #64389
Copy link
Copy link
Closed
Labels
A-jobsC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)C-performancePerf of queries or internals. Solution not expected to change functional behavior.Perf of queries or internals. Solution not expected to change functional behavior.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Description
Is your feature request related to a problem? Please describe.
Create an API to create a batch of jobs. All existing APIs only allow creating a single job at a time.
Describe the solution you'd like
(*jobs.Registry).CreateJobsWithTxn
Additional context
This is one of the remaining work items to fix #41930.
The relevant context is that today we create or update jobs eagerly during schema change operations in
Line 104 in 67099fa
| func (p *planner) createOrUpdateSchemaChangeJob( |
Rather than creating these jobs eagerly, we should just store the intended job record in the extraTxnState and write it in one go before committing. This will be a major performance optimization for the existing code path and will be easy to adopt in the new schema changer.
Epic: CRDB-8577
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-jobsC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)C-performancePerf of queries or internals. Solution not expected to change functional behavior.Perf of queries or internals. Solution not expected to change functional behavior.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)