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 摘要。