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 Jan 31, 2021
1 parent f955d8d commit 0ad30f4
Show file tree
Hide file tree
Showing 3 changed files with 590 additions and 219 deletions.
Loading

0 comments on commit 0ad30f4

Please sign in to comment.