cockroachdb / cockroachdb/docs

Clarify and add examples for zone config constraints with hierarchy

Open
#4,459 2 comments 0 reactions 1 assignee Claimed by @rmloveland View on GitHub
C-doc-improvement P-1 T-incorrect-or-unclear-info T-more-examples-needed
Dominant language
HTML
Stars
212
Forks
476
Avg merge
40m
Merged PRs (30d)
3

Description

Jesse Seldess commented:

https://www.cockroachlabs.com/docs/stable/configure-replication-zones.html#types-of-constraints

- Add clear explanation of syntax for multi-level constraints.
- Add example with multi-level constraints.
- Validate the syntax for leaseholder preferences and add example.

Question from @robert-s-lee:

```
ALTER PARTITION user1 OF TABLE defaultdb.usertable CONFIGURE ZONE USING constraints='[+cloud=gce,region=us-east1,zone=us-east1-b]', lease_preferences='[[+cloud=gce,region=us-east1,zone=us-east1-b]]'; ALTER PARTITION user2 OF TABLE defaultdb.usertable CONFIGURE ZONE USING constraints='[+cloud=gce,region=us-west1,zone=us-west1-b]', lease_preferences='[[+cloud=gce,region=us-west1,zone=us-west1-b]]'; ALTER PARTITION user3 OF TABLE defaultdb.usertable CONFIGURE ZONE USING constraints='[+cloud=gce,region=europe-west2,zone=europe-west2-b]', lease_preferences='[[+cloud=gce,region=europe-west2,zone=europe-west2-b]]';
Error: pq: could not validate zone config: constraints must either be required (prefixed with a '+') or prohibited (prefixed with a '-')
```

Jira Issue: DOC-250

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.