sql/schemachanger: add version gate for DROP CONSTRAINT on unique ind…#163859
Merged
trunk-io[bot] merged 1 commit intocockroachdb:masterfrom Feb 18, 2026
Merged
sql/schemachanger: add version gate for DROP CONSTRAINT on unique ind…#163859trunk-io[bot] merged 1 commit intocockroachdb:masterfrom
trunk-io[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
…exes The declarative schema changer added support for ALTER TABLE ... DROP CONSTRAINT on unique constraints in 5dcf331, but did not include a cluster version gate. In mixed-version clusters (26.1 → 26.2), this caused non-deterministic behavior: requests landing on v26.2 nodes succeeded via the DSC, while requests landing on v26.1 nodes fell back to the legacy schema changer and returned a FeatureNotSupported error. This broke the schemachange workload in mixed-version testing because it expected deterministic behavior — either always succeeding or always failing. Add a version gate in dropUniqueIndexBackedConstraint so the DSC falls back to the legacy schema changer on all nodes until the cluster version reaches v26.2, ensuring consistent behavior during upgrades. Also update the logic tests for mixed-version configs to expect the legacy behavior. Fixes: cockroachdb#163321 Release note: None Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
😎 Merged successfully - details. |
Member
fqazi
approved these changes
Feb 18, 2026
Collaborator
fqazi
left a comment
There was a problem hiding this comment.
@fqazi reviewed 2 files and all commit messages, and made 1 comment.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on rafiss).
Collaborator
Author
|
tftr! /trunk merge |
Collaborator
Author
|
/trunk merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…exes
The declarative schema changer added support for ALTER TABLE ... DROP CONSTRAINT on unique constraints in 5dcf331, but did not include a cluster version gate. In mixed-version clusters (26.1 → 26.2), this caused non-deterministic behavior: requests landing on v26.2 nodes succeeded via the DSC, while requests landing on v26.1 nodes fell back to the legacy schema changer and returned a FeatureNotSupported error.
This broke the schemachange workload in mixed-version testing because it expected deterministic behavior — either always succeeding or always failing.
Add a version gate in dropUniqueIndexBackedConstraint so the DSC falls back to the legacy schema changer on all nodes until the cluster version reaches v26.2, ensuring consistent behavior during upgrades. Also update the logic tests for mixed-version configs to expect the legacy behavior.
Fixes: #163321
Release note: None