Skip to content

Conversation

@spilchen
Copy link
Contributor

Previously, the INSPECT job only recorded the table IDs involved in the job. However, there is a time gap between when the job record is created and when the job is executed, during which schema changes amy occur. These changes can invalidate assumptions made at job creation (e.g. index ID existence).

This change introduces table version tracking into the job record. Before executing any checks, the job will verify that the current table versions match those stored at creation. If a mismatch is detected, the job will fail early.

This mechanism mirrors similar protections implemented in other jobs, such as TTL jobs.

Informs #158197
Release note: none

Previously, the INSPECT job only recorded the table IDs involved in the
job. However, there is a time gap between when the job record is created
and when the job is executed, during which schema changes amy occur.
These changes can invalidate assumptions made at job creation (e.g.
index ID existence).

This change introduces table version tracking into the job record.
Before executing any checks, the job will verify that the current table
versions match those stored at creation. If a mismatch is detected, the
job will fail early.

This mechanism mirrors similar protections implemented in other jobs,
such as TTL jobs.

Informs cockroachdb#158197
Release note: none
@spilchen spilchen self-assigned this Nov 21, 2025
@cockroach-teamcity
Copy link
Member

This change is Reviewable

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