Skip to content

jobs: add stub implementation of consistency check job #148614

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

Conversation

spilchen
Copy link
Contributor

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

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: cockroachdb#148289
Epic: CRDB-30356
Release note: None
@spilchen spilchen self-assigned this Jun 20, 2025
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@spilchen spilchen force-pushed the gh-148289/250420/1645/check-job-infra/pr-ready branch 2 times, most recently from 39d992a to 47cb37d Compare June 21, 2025 18:27
spilchen added 2 commits June 22, 2025 09:17
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: cockroachdb#148289
Epic: CRDB-30356
Release note: None
This change introduces logic tests for the new consistency check job
path when enable_scrub_job is enabled.

Informs: cockroachdb#148289
Epic: CRDB-30356
Release note: None
@spilchen spilchen force-pushed the gh-148289/250420/1645/check-job-infra/pr-ready branch from 47cb37d to 76bb5c7 Compare June 22, 2025 12:17
Copy link

blathers-crl bot commented Jun 22, 2025

Your pull request contains more than 1000 changes. It is strongly encouraged to split big PRs into smaller chunks.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

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: cockroachdb#148289
Epic: CRDB-30356
Release note: None
@spilchen spilchen force-pushed the gh-148289/250420/1645/check-job-infra/pr-ready branch from 76bb5c7 to 150f673 Compare June 23, 2025 11:34
@spilchen spilchen closed this Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants