jobs: add stub implementation of consistency check job #148614
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds infrastructure for a new job that will handle data consistency checking. It will be initially invoked via the EXPERIMENTAL SCRUB command and a new session variable (enable_scrub_job). It will eventually be invoked under its own SQL, but that will be handled separately.
I split this into 4 commits to make reviewing easier. I will squash them prior to merging to master.
jobs: add stub implementation of consistency check job
This commit introduces a stub for the new CONSISTENCY_CHECK job type. The Resumer doesn't do anything useful yet. It simply returns as a no-op.
Informs: #148289
Epic: CRDB-30356
Release note: None
sql: support starting consistency check job from SCRUB
This change adds support for initiating a CONSISTENCY_CHECK job when running SCRUB TABLE, controlled by the session variable enable_scrub_job.
When enable_scrub_job is true, SCRUB TABLE will schedule or start a consistency check job instead of running inline checks.
Informs: #148289
Epic: CRDB-30356
Release note: None
sql: add logic tests for consistency check job via SCRUB
This change introduces logic tests for the new consistency check job path when enable_scrub_job is enabled.
Informs: #148289
Epic: CRDB-30356
Release note: None
sql: add unit test for SCRUB job execution semantics
This change adds a unit test (TestCheckJobImplicitTxnSemantics) to verify the behavior of consistency check jobs started via EXPERIMENTAL SCRUB TABLE in implicit transactions.
Includes test hooks via ConsistencyCheckTestingKnobs to simulate and control job execution behavior.
Informs: #148289
Epic: CRDB-30356
Release note: None