Skip to content

Commit

Permalink
sql: hook up multi-region DDL to new zone config attributes
Browse files Browse the repository at this point in the history
After the introduction of cockroachdb#57184, we can constrain voting replicas
separately from non-voting replicas using the new attributes
`num_voters` and `voter_constraints`. This commit connects our
multi-region DDL statements to leverage these new attributes.

Broadly speaking,
- The existing `constraints` and `num_replicas` fields are set at the
database level, to be inherited by table/partition level zone configs.
- The new attributes: `num_voters` and `voter_constraints` (along with
accompanying `lease_preferences` for these voters) are set at the
table/partition level.

This brings the implementation of these DDL statements inline with the
functional specfication.

Fixes cockroachdb#57663

Release note: None
  • Loading branch information
aayushshah15 committed Feb 1, 2021
1 parent f9a27ca commit 14fb683
Show file tree
Hide file tree
Showing 5 changed files with 822 additions and 375 deletions.
Loading

0 comments on commit 14fb683

Please sign in to comment.