8000 sql: setup job infra for CHECK command (no-op implementation) · Issue #148289 · cockroachdb/cockroach · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
sql: setup job infra for CHECK command (no-op implementation) #148289
Open
@spilchen

Description

@spilchen

This task introduces the job infrastructure for executing data consistency checks. Initially, the job will act as a no-op to allow incremental development and plumbing. The job will be triggered through the existing EXPERIMENTAL SCRUB command, gated behind a temporary feature flag.

Details

  • Introduce a new job type for CHECK operations. The initial job implementation should complete immediately without performing any actual validation.
  • Add a new cluster setting or feature flag, e.g., enable_scrub_job, to control whether EXPERIMENTAL SCRUB triggers the new job or uses its current synchronous execution path.
  • Update EXPERIMENTAL SCRUB to submit a job when the flag is enabled.
  • Since the job is asynchronous, adjust transaction semantics accordingly:
    • If possible, the user-facing transaction should commit immediately once the job is created.
    • The statement should block until the job finishes, similar to how schema changes behave.
    • If the statement or transaction times out before the job finishes, a NOTICE should be emitted indicating that the job is still running, along with the job ID.
  • This infrastructure will lay the groundwork for CHECK TABLE and CHECK DATABASE to later invoke the same job type.

Jira issue: CRDB-51518

Epic CRDB-30356

Metadata

Metadata

Assignees

Labels

A-sql-scrubC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0