cockroachdb / cockroachdb/docs

Node attribute usage needs improved documentation

Open
#12,915 2 comments 0 reactions 1 assignee Claimed by @rmloveland View on GitHub
C-doc-improvement
Dominant language
HTML
Stars
212
Forks
476
Avg merge
40m
Merged PRs (30d)
3

Description

Shaun McVey (smcvey) commented:

If I set a node attribute on a few nodes in a cluster, eg:

```
--attrs=ram:64gb
```

and other nodes like this:

```
--attrs=ram:16gb
```

the documents don't say how I can use zone configurations to select between them.

My own naive attempts were like this:

```
ALTER DATABASE defaultdb CONFIGURE ZONE USING constraints = '[+ram:64gb]';
ERROR: constraint "+ram:64gb" matches no existing nodes within the cluster - did you enter it correctly?
SQLSTATE: 23514
```

I figured out I could do this, but it would not distinguish between nodes that were 64gb and those which were 16gb:

```
ALTER DATABASE defaultdb CONFIGURE ZONE USING constraints = '[+ram]';
CONFIGURE ZONE 1
```

I've since learned that I could create levels of attribute selections using this format:

```
ALTER DATABASE defaultdb CONFIGURE ZONE USING constraints = '[+ram, +64gb]';
or
ALTER DATABASE defaultdb CONFIGURE ZONE USING constraints = '[+ram, +16gb]';
```

The docs at https://www.cockroachlabs.com/docs/v21.2/configure-replication-zones need to offer some examples of using multi-level attributes like this, which they currently don't.

Jira Issue: DOC-2482

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.