-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sql/schemachanger: remove DROP INDEX fallbacks for regional by row #137989
sql/schemachanger: remove DROP INDEX fallbacks for regional by row #137989
Conversation
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. |
7050ed7
to
0f7112b
Compare
0f7112b
to
bfb23e4
Compare
bfb23e4
to
70bd5e6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for doing this!
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @kev-cao and @rafiss)
pkg/sql/catalog/multiregion/region_util.go
line 90 at r2 (raw file):
o SynthesizeRegionConfigOptions, ) (RegionConfig, error) { // move below stuff to multiregion/region_util.go
leftover comment
This commit moves function and type definitions to a smaller package so the declarative schema changer can use it. Release note: None
This adds SynthesizeRegionConfig to the RegionProvider interface so that the scbuild package can use it. Release note: None
This commit introduces a new function that will fail a schema change if the table is regional by row and if any of the regions for the database are currently being modified. With this new check, we no longer need to fallback to the legacy schema changer for DROP INDEX. Previously we had to, since this check was only implemented there. This check was also added for ALTER PRIMARY KEY, CREATE INDEX, ADD COLUMN, and DROP COLUMN, but the regional-by-row fallback still exists for those operations. Release note: None
70bd5e6
to
42b9060
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tftr!
bors r+
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @annrpom and @kev-cao)
pkg/sql/catalog/multiregion/region_util.go
line 90 at r2 (raw file):
Previously, annrpom (annie pompa) wrote…
leftover comment
fixed
catalog/multiregion: move SynthesizeMultiregionConfig function
This commit moves function and type definitions to a smaller package so
the declarative schema changer can use it.
sql/regions: extract SynthesizeRegionConfig into interface
This adds SynthesizeRegionConfig to the RegionProvider interface so that
the scbuild package can use it.
sql/schemachanger: remove DROP INDEX fallbacks for regional by row
This commit introduces a new function that will fail a schema change if
the table is regional by row and if any of the regions for the database
are currently being modified. With this new check, we no longer need to
fallback to the legacy schema changer for DROP INDEX. Previously we had
to, since this check was only implemented there.
This check was also added for ALTER PRIMARY KEY, CREATE INDEX, ADD COLUMN,
and DROP COLUMN, but the regional-by-row fallback still exists for those
operations.
fixes #136320
Release note: None