Skip to content

Conversation

fqazi
Copy link
Collaborator

@fqazi fqazi commented Oct 6, 2025

Backport 1/1 commits from #154752 on behalf of @fqazi.


Previously, we adjusted the schema changer rules to ensure that
old secondary indexes are only dropped when the new secondary index is
usable. Unfortunately, one of the rules had an incorrect filter. To
address this, this patch fixes the filter to expect the new secondary
index, which will have the new flag. Additionally, the index recreation
logic for ALTER PRIMARY KEY was delaying when the new secondary indexes
could be made public.

Fixes: #154751

Release note: None


Release justification: fix for a bug introduced during 25.4 development

Previously, we adjusted the schema changer rules to ensure that
old secondary indexes are only dropped when the new secondary index is
usable. Unfortunately, one of the rules had an incorrect filter. To
address this, this patch fixes the filter to expect the new secondary
index, which will have the new flag. Additionally, the index recreation
logic for ALTER PRIMARY KEY was delaying when the new secondary indexes
could be made public.

Fixes: cockroachdb#154751

Release note: None
@fqazi fqazi requested a review from a team as a code owner October 6, 2025 23:22
@fqazi fqazi force-pushed the blathers/backport-release-25.4-154752 branch from 61686af to d710a72 Compare October 6, 2025 23:22
@blathers-crl blathers-crl bot added blathers-backport This is a backport that Blathers created automatically. O-robot Originated from a bot. labels Oct 6, 2025
@blathers-crl blathers-crl bot requested a review from spilchen October 6, 2025 23:22
Copy link

blathers-crl bot commented Oct 6, 2025

Thanks for opening a backport.

Before merging, please confirm that the change does not break backwards compatibility and otherwise complies with the backport policy. Include a brief release justification in the PR description explaining why the backport is appropriate. All backports must be reviewed by the TL for the owning area. While the stricter LTS policy does not yet apply, please exercise judgment and consider gating non-critical changes behind a disabled-by-default feature flag when appropriate.

@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 Oct 6, 2025
Copy link

blathers-crl bot commented Oct 6, 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.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@rafiss rafiss merged commit 6989471 into cockroachdb:release-25.4 Oct 7, 2025
15 checks passed
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 blathers-backport This is a backport that Blathers created automatically. O-robot Originated from a bot. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) target-release-25.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants