cockroachdb / cockroachdb/cockroach

jobs: create per job configuration API

Open
#114,828 0 comments 0 reactions 0 assignees View on GitHub
A-jobs C-enhancement T-jobs
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

Currently, there are two general approaches for allowing the user to alter the configuration of a running job:
- create a cluster setting that gets checked during job execution. This has two main drawbacks: 1) the cluster setting affects all jobs that check that setting, instead of the specific executing job; 2) cockroach has way too many cluster settings (i.e. foot guns).
- create or modify a sql cmd along the lines of `ALTER {job} SET CONFIG {config}`. Currently c2c and backup schedules have this approach. The drawback is that its a pain to create and maintain a sql cmd for each type of job. Further, these current implementations manipulate details in the job record.

Instead of these approaches, we ought to create job config API, which allows a job writer to easily create and maintain an `ALTER {job_type} {job_id} SET CONFIG {config}` cmd variant. With this API, each job type would read and write its config information to the new job info table.

Jira issue: CRDB-33704

Epic CRDB-32494

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.