Skip to content

kv,sql: change {system.zones,span_configurations} to honor fine grained data domiciliation rules pertaining to indexed values #70913

@knz

Description

@knz

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

  1. create a table and split it into multiple region via zone configs
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-kvKV TeamX-staleno-issue-activity

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions