Skip to content
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 some fallbacks for regional by row #137989

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rafiss
Copy link
Collaborator

@rafiss rafiss commented Dec 26, 2024

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 some 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. Previously we had to, since this
check was only implemented there.

ALTER PRIMARY KEY and CREATE INDEX still fallback to the legacy schema
changer, since more work is needed to make them work properly.

fixes #136320
Release note: None

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
Copy link

blathers-crl bot commented Dec 26, 2024

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.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

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. Previously we had to, since this
check was only implemented there.

ALTER PRIMARY KEY and CREATE INDEX still fallback to the legacy schema
changer, since more work is needed to make them work properly.

Release note: None
@rafiss rafiss force-pushed the dsc-check-region-change-underway branch from 7050ed7 to 0f7112b Compare December 26, 2024 17:16
@rafiss rafiss changed the title sql/schemachanger: remove fallbacks for regional by row sql/schemachanger: remove some fallbacks for regional by row Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

schemachanger: add checkNoRegionChangeUnderway checks
2 participants