cockroachdb / cockroachdb/docs

Clarify and add examples for zone config constraints with hierarchy

Đang mở
#4,459 2 bình luận 0 reaction 1 người được giao Được @rmloveland nhận Xem trên GitHub
C-doc-improvement P-1 T-incorrect-or-unclear-info T-more-examples-needed
Ngôn ngữ chính
HTML
Star
212
Fork
476
Merge trung bình
40 phút
Pull request đã merge (30 ngày)
3

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.