release-21.1: sql: Don't clear zone configs on indexes during a RBR transition #65833
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.
Backport 1/1 commits from #63665.
/cc @cockroachdb/release
Previously we were wiping out the zone configs for all indexes when
transitioning from REGIONAL BY ROW to either GLOBAL or REGIONAL BY
TABLE. This was problematic because there could have been zone configs
which were setup by the user and didn't have any multi-region zone
config fields set. This fix ensures that we don't wipe out the zone
configs for indexes, provided that they contain at least one field set
that isn't governed by the multi-region syntax.
Release note (sql change): Fixes a bug where transitioning from locality
REGIONAL BY ROW to GLOBAL or REGIONAL BY TABLE could mistakenly remove a
zone configuration on an index which has no multi-region fields set.
Resolves: #63614.