Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify and add examples for zone config constraints with hierarchy #4459

Open
jseldess opened this issue Mar 5, 2019 · 2 comments
Open
Labels
P-1 High priority; must be done this release T-incorrect-or-unclear-info T-more-examples-needed

Comments

@jseldess
Copy link
Contributor

jseldess commented Mar 5, 2019

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

@jseldess
Copy link
Contributor Author

jseldess commented Mar 7, 2019

From #4447:

Currently today the only example of an array I could find on the page is the following:
constraints = '[+ssd, -region=west]' I think it would be great to perhaps show something like:

constraints = '[+region=west, +region=central]' to make it clear how this could be used. Showing this in an alter statement down the page would also be great.

@rkruze
Copy link
Contributor

rkruze commented Mar 7, 2019

From my understanding, constraints = '[+region=west, +region=central]' doesn't work as it will look for a node with both region set to "west" and also set to "central". Most likely no nodes will fit this constraint. You could have constraints like constraints = '[+cloud=aws, +region=central]'

@jseldess jseldess added A-prod and removed A-bulk-io labels Oct 1, 2019
@jseldess jseldess modified the milestones: 19.2, 20.1 Oct 1, 2019
rmloveland added a commit that referenced this issue Oct 30, 2019
Specifically, add docs for the new system tables that provide insight
into:

- Whether data is under-replicated or unavailable

- Violations of data placement requirements

- Which localities are critical

Fixes #4730.

Addresses #2957, #5636.

Relates to #4459.
rmloveland added a commit that referenced this issue Nov 4, 2019
Specifically, add docs for the new system tables that provide insight
into:

- Whether data is under-replicated or unavailable

- Violations of data placement requirements

- Which localities are critical

Fixes #4730.

Addresses #2957, #5636.

Relates to #4459.
rmloveland added a commit that referenced this issue Nov 8, 2019
Specifically, add docs for the new system tables that provide insight
into:

- Whether data is under-replicated or unavailable

- Violations of data placement requirements

- Which localities are critical

Fixes #4730.

Addresses #2957, #5636.

Relates to #4459.
rmloveland added a commit that referenced this issue Nov 11, 2019
Specifically, add docs for the new system tables that provide insight
into:

- Whether data is under-replicated or unavailable

- Violations of data placement requirements

- Which localities are critical

Fixes #4730.

Addresses #2957, #5636.

Relates to #4459.
@jseldess jseldess removed this from the 20.1 milestone May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-1 High priority; must be done this release T-incorrect-or-unclear-info T-more-examples-needed
Projects
None yet
Development

No branches or pull requests

3 participants