sql/schemachanger: refactor update of parent schema ID in table descriptors#169345
Merged
trunk-io[bot] merged 1 commit intocockroachdb:masterfrom Apr 30, 2026
Merged
Conversation
Contributor
|
😎 Merged successfully - details. |
|
It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR? 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
Member
16a287e to
473d554
Compare
rafiss
reviewed
Apr 29, 2026
Collaborator
rafiss
left a comment
There was a problem hiding this comment.
nice, just saw the test case that needed updating. could there also be a logictest that shows a user-facing issue?
…iptors The schema ID field was not being set when walked over for an update because of a silent fallthrough; another op was updating the field. The change adds an error-default that exposes the silent fallthrough and refactors handling of the table descriptor's update to the expected place. Supports: cockroachdb#168255 Part of: cockroachdb#164216 Epic: CRDB-31325 Release note: None
473d554 to
aab7d7a
Compare
Contributor
Author
|
From those tests, turns out it was being updated but it wasn't where it was expected so this is a refactor and tests. |
bghal
added a commit
to bghal/cockroach
that referenced
this pull request
Apr 30, 2026
The issue in cockroachdb#169345 demonstrated the risk of switch statements on types if an unexpected type is passed to the vistor function. This change guards against future bugs by adding errors-on-default that trip on unexpected types. Epic: CRDB-31325 Informed by: cockroachdb#169345 Release note: None
Collaborator
|
/trunk merge |
bghal
added a commit
to bghal/cockroach
that referenced
this pull request
May 1, 2026
The issue in cockroachdb#169345 demonstrated the risk of switch statements on types if an unexpected type is passed to the vistor function. This change guards against future bugs by adding errors-on-default that trip on unexpected types. Epic: CRDB-31325 Informed by: cockroachdb#169345 Release note: None
bghal
added a commit
to bghal/cockroach
that referenced
this pull request
May 1, 2026
The issue in cockroachdb#169345 demonstrated the risk of switch statements on types if an unexpected type is passed to the vistor function. This change guards against future bugs by adding errors-on-default that trip on unexpected types. Epic: CRDB-31325 Informed by: cockroachdb#169345 Release note: None
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.
The schema ID field was not being set when walked over for an update
because of a silent fallthrough; another op was updating the field. The
change adds an error-default that exposes the silent fallthrough and
refactors handling of the table descriptor's update to the expected
place.
Supports: #168255
Part of: #164216
Epic: CRDB-31325
Release note: None