Skip to content

Conversation

fqazi
Copy link
Collaborator

@fqazi fqazi commented Sep 24, 2025

Previously, we were completely ignoring schema_locked for the TRUNCATE command, which could changefeeds to break. To address this, this patch blocks TRUNCATE on schema_locked tables.

Fixes: #151941

Release note (bug fix): schema_locked was not enforced on the TRUNCATE command, which could cause changefeed jobs to fail.
Release justification: low risk fix for an issue that can break change feed if tables truncated

Previously, we were completely ignoring schema_locked for the TRUNCATE
command, which could changefeeds to break. To address this, this patch
blocks TRUNCATE on schema_locked tables.

Fixes: cockroachdb#151941

Release note (bug fix): schema_locked was not enforced on the TRUNCATE
command, which could cause changefeed jobs to fail.
Copy link

blathers-crl bot commented Sep 24, 2025

Thanks for opening a backport.

Before merging, please confirm that it falls into one of the following categories (select one):

  • Non-production code changes. Includes test-only changes, build system changes, etc.
  • Fixes for serious issues. Defined in the policy as correctness, stability, or security issues, data corruption/loss, significant performance regressions, breaking working and widely used functionality, or an inability to detect and debug production issues.
  • Other approved changes. These changes must be gated behind a disabled-by-default feature flag unless there is a strong justification not to.

Add a brief release justification to the PR description explaining your selection.

Also, confirm that the change does not break backward compatibility and complies with all aspects of the backport policy.

All backports must be reviewed by the TL and EM for the owning area.

@blathers-crl blathers-crl bot added backport Label PR's that are backports to older release branches T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) labels Sep 24, 2025
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link

blathers-crl bot commented Sep 24, 2025

❌ PR #154048 does not comply with backport policy

Confidence: high
Explanation: The PR is intended to address an issue where 'schema_locked' was not enforced on the TRUNCATE command, potentially causing failures in changefeed jobs. Although categorized as a bug fix in the PR description and highlights an operational integrity issue, it does not definitively meet the criteria outlined for critical bugs, which are primarily centered around stability or security issues, data corruption, significant performance regressions, incorrect database results, or severe debugging handicaps. It's primarily directed at operational consistency and preventing disruptions rather than correcting an inherently flawed functionality causing critical operational failures or data issues. No evidence suggests the change is protected by a feature flag or has been orchestrated with additional safeguards like new cluster/session settings that would merit an exception for non-critical changes. The PR does not remove any version gates or make backward-incompatible changes, so it remains backward compatible.
Recommendation: Reconsider the backport or include this change as part of a broader critical update with appropriate safety checks or as a feature-gated adjustment.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Label PR's that are backports to older release branches T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants