Describe the problem
When configuring zones for table partitions, the zone configs themselves are stored in a single range in system.zones. The zone configs contain partition prefixes from the tables, and thus region-sensitive data, and so that data escapes the region that it should remain in.
This makes it impossible to do strict data sovereignty partitioning using multi-region CockroachDB when domicilied data is indexed. (The issue does not exist when domicilied data is not indexed.)
Note: we already document this limitation in https://www.cockroachlabs.com/docs/stable/data-domiciling.html#limitations
Epic: CRDB-10287
To Reproduce
- create a table and split it into multiple region via zone configs
- dump the binary content of system.zones: observe that the region-specific prefixes are stored in the common range
Expected behavior
Any zone config binary data that includes a copy from region-specific table data should be stored in the same region as that table's data.
Environment:
crdb v21.2
Jira issue: CRDB-10284