Skip to content

sql: Avoid wide scans of jobs table when starting compaction job. #78465

@miretskiy

Description

@miretskiy

Scheduled compaction job should not perform a system.jobs table scan to verify
compaction job does not exist. Doing so is not needed since scheduling system already
does that, and furthermore, it's extremely disrupting to the scheduling system.

Performing system.jobs scan as part of starting the job results in any existing job
(not necessarily started by schedule) causing the schedule to be restarted. Restarting the schedule
results in new job records being created, and increase in the intents, with subsequent lock ups of the
jobs (and schedules) tables.s

Jira issue: CRDB-14143

Metadata

Metadata

Assignees

Labels

A-jobsA-sql-executionRelating to SQL execution.C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-jobs

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions