cockroachdb / cockroachdb/docs

Clarify and add examples for zone config constraints with hierarchy

未关闭
#4,459 2 条评论 0 个 reaction 已指派 1 人 已被 @rmloveland 认领 在 GitHub 查看
C-doc-improvement P-1 T-incorrect-or-unclear-info T-more-examples-needed
主要语言
HTML
星标
212
派生
476
平均合并
40 分钟
30 天内合并 PR
3

描述

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

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。