forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zone: Fix zone configuration application bug
There was a bug that allowed zone configuration application on indexes to leak into the zone configurations for partitions, due to a subtlety in ZoneConfig.GetSubzone. This PR fixes the bug with zone configuration application and adds a test. This PR is necessary for cockroachdb#40493 to land. An example of this is as follows: ``` CREATE TABLE infect (x INT PRIMARY KEY); ALTER TABLE infect PARTITION BY LIST (x) ( PARTITION p1 VALUES IN (1)); ALTER INDEX infect@primary CONFIGURE ZONE USING num_replicas=5; ALTER PARTITION p1 OF TABLE infect CONFIGURE ZONE USING constraints='[+dc=dc1]'; ``` Before, the zone configuration for p1 would *also have* num_replicas=5 set, which should not be the case. This PR ensures that the zone configuration for p1 only has constraints set. Release Justification: Important bug fix. Release note (bug fix): Fixing bug where zone configuration application on indexes could leak into configurations on partitions.
- Loading branch information
Rohan Yadav
committed
Sep 26, 2019
1 parent
73cc4ea
commit c5aba04
Showing
3 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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