sql: fix bug in ALTER INDEX ... PARTITION BY#79561
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Apr 7, 2022
Merged
Conversation
Member
There was a subtle bug here whereby we'd increment the version an extra time when running ALTER INDEX ... PARTITION BY in the same transaction as a previous DDL to the same table. It's not exactly clear what the implications here would be. They are subtle. Release note: None
ee64220 to
9351707
Compare
otan
approved these changes
Apr 7, 2022
Contributor
Author
|
TFTR! bors r+ |
Contributor
|
This PR was included in a batch that was canceled, it will be automatically retried |
Contributor
|
Build succeeded: |
craig bot
pushed a commit
that referenced
this pull request
Apr 8, 2022
79580: sql/catalog/descs: enforce invariant that OriginalVersion does not ch… r=ajwerner a=ajwerner …ange It's a bug any time we increment a version more than once in the context of a single descriptor collection. Let's enforce it. This would have prevented bugs like the one fixed in #79561. Release note: None Co-authored-by: Andrew Werner <awerner32@gmail.com>
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.
There was a subtle bug here whereby we'd increment the version an
extra time when running ALTER INDEX ... PARTITION BY in the same
transaction as a previous DDL to the same table. It's not exactly
clear what the implications here would be. They are subtle.
Release note: None