Skip to content

Commit 400fcb5

Browse files
authored
RS: Add DB config options and example to crdb-cli crdb update reference (#1129)
* DOC-4563 RS: DB config options for crdb-cli crdb update default-db-config * DOC-4563 Added update default-db-config example to crdb-cli reference
1 parent 17f8942 commit 400fcb5

File tree

2 files changed

+32
-20
lines changed

2 files changed

+32
-20
lines changed

content/operate/rs/references/cli-utilities/crdb-cli/crdb/update.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ If you want to change the configuration of the local instance only, use [`rladmi
4141
| causal-consistency | true <br/>false | [Causal consistency]({{< relref "/operate/rs/databases/active-active/causal-consistency.md" >}}) applies updates to all instances in the order they were received |
4242
| compression | 0-6 | The level of data compression: <br /><br /> 0 = No compression <br /><br /> 6 = High compression and resource load (Default: 3) |
4343
| credentials id=\<id\>,username=\<username\>,password=\<password\> | strings | Updates the credentials for access to the instance |
44-
| default-db-config \<configuration\> | | Default database configuration from stdin |
44+
| default-db-config \<configuration\> | | Default database configuration from stdin. For a list of database settings, see the [CRDB database config object]({{<relref "/operate/rs/references/rest-api/objects/crdb/database_config">}}) reference. |
4545
| default-db-config-file \<filename\> | filepath | Default database configuration from file |
4646
| encryption | true <br/>false | Activates or deactivates encryption |
4747
| force | | Force an update even if there are no changes |
@@ -57,10 +57,22 @@ Returns the task ID of the task that is updating the database.
5757
5858
If `--no-wait` is specified, the command exits. Otherwise, it will wait for the database to be updated and then return "finished."
5959
60-
### Example
60+
### Examples
61+
62+
The following example changes the maximum database memory:
63+
64+
```sh
65+
$ crdb-cli crdb update --crdb-guid <crdb-guid> --memory-size 2GB
66+
Task <task-id> created
67+
---> Status changed: queued -> started
68+
---> Status changed: started -> finished
69+
```
70+
71+
The following example shows how to change a default database configuration setting:
6172
6273
```sh
63-
$ crdb-cli crdb update --crdb-guid 968d586c-e12d-4b8f-8473-42eb88d0a3a2 --memory-size 2GBTask 7e98efc1-8233-4578-9e0c-cdc854b8af9e created
74+
$ crdb-cli crdb update --crdb-guid <crdb-guid> --default-db-config '{"shards_count": <primary_shards_count>}'
75+
Task <task-id> created
6476
---> Status changed: queued -> started
6577
---> Status changed: started -> finished
6678
```

content/operate/rs/references/rest-api/objects/crdb/database_config.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,26 @@ An object that represents the database configuration.
1414

1515
| Name | Type/Value | Description |
1616
|------|------------|-------------|
17-
| aof_policy | string | Policy for Append-Only File data persistence |
17+
| aof_policy | **'appendfsync-every-sec'** <br />'appendfsync-always' | Policy for Append-Only File data persistence |
1818
| authentication_admin_pass | string | Administrative databases access token |
1919
| authentication_redis_pass | string | Redis AUTH password (deprecated as of Redis Enterprise v7.2, replaced with multiple passwords feature in version 6.0.X) |
20-
| bigstore | boolean | Database driver is Auto Tiering |
21-
| bigstore_ram_size | integer | Memory size of RAM size |
22-
| data_persistence | string | Database on-disk persistence |
20+
| bigstore | boolean (default: false) | Database driver is Auto Tiering |
21+
| bigstore_ram_size | integer (default: 0) | Memory size of RAM size |
22+
| data_persistence | 'disabled'<br />'snapshot'<br />**'aof'** | Database on-disk persistence policy. For snapshot persistence, a [snapshot_policy]({{< relref "/operate/rs/references/rest-api/objects/bdb/snapshot_policy" >}}) must be provided |
2323
| enforce_client_authentication | **'enabled'** <br />'disabled' | Require authentication of client certificates for SSL connections to the database. If enabled, a certificate should be provided in either <span class="break-all">`authentication_ssl_client_certs`</span> or <span class="break-all">`authentication_ssl_crdt_certs`</span> |
24-
| max_aof_file_size | integer | Hint for maximum AOF file size |
25-
| max_aof_load_time | integer | Hint for maximum AOF reload time |
26-
| memory_size | integer | Database memory size limit, in bytes |
27-
| oss_cluster | boolean | Enables OSS Cluster mode |
28-
| oss_cluster_api_preferred_ip_type | string | Indicates preferred IP type in OSS cluster API: internal/external |
29-
| oss_sharding | boolean | An alternative to shard_key_regex for using the common case of the OSS shard hashing policy |
24+
| max_aof_file_size | integer | Maximum AOF file size in bytes |
25+
| max_aof_load_time | integer (default: 3600) | Maximum AOF reload time in seconds |
26+
| memory_size | integer (default: 0) | Database memory size limit in bytes. 0 is unlimited. |
27+
| oss_cluster | boolean (default: false) | Enables OSS Cluster mode |
28+
| oss_cluster_api_preferred_ip_type | 'internal'<br />'external' | Indicates preferred IP type in OSS cluster API |
29+
| oss_sharding | boolean (default: false) | An alternative to `shard_key_regex` for using the common case of the OSS shard hashing policy |
3030
| port | integer | TCP port for database access |
31-
| proxy_policy | string | The policy used for proxy binding to the endpoint |
32-
| rack_aware | boolean | Require the database to be always replicated across multiple racks |
33-
| replication | boolean | Database replication |
31+
| proxy_policy | 'single'<br />'all-master-shards'<br />'all-nodes' | The policy used for proxy binding to the endpoint |
32+
| rack_aware | boolean (default: false) | Require the database to be always replicated across multiple racks |
33+
| replication | boolean (default: true) | Database replication |
3434
| sharding | boolean (default:&nbsp;false) | Cluster mode (server-side sharding). When true, shard hashing rules must be provided by either `oss_sharding` or `shard_key_regex` |
3535
| shard_key_regex | `[{ "regex": string }, ...]` | Custom keyname-based sharding rules (required if sharding is enabled)<br /><br />To use the default rules you should set the value to:<br />`[{"regex": ".*\\{(?<tag>.*)\\}.*"}, {"regex": "(?<tag>.*)"}]` |
36-
| shards_count | integer | Number of database shards |
37-
| shards_placement | string | Control the density of shards: should they reside on as few or as many nodes as possible |
38-
| snapshot_policy | array of [snapshot_policy]({{< relref "/operate/rs/references/rest-api/objects/bdb/snapshot_policy" >}}) objects | Policy for snapshot-based data persistence (required) |
39-
| tls_mode | string | Encrypt communication |
36+
| shards_count | integer (range: 1-512) (default: 1) | Number of database shards |
37+
| shards_placement | 'dense'<br />'sparse' | Control the density of shards<br />Values:<br />**'dense'**: Shards reside on as few nodes as possible <br /> **'sparse'**: Shards reside on as many nodes as possible |
38+
| snapshot_policy | array of [snapshot_policy]({{< relref "/operate/rs/references/rest-api/objects/bdb/snapshot_policy" >}}) objects | Policy for snapshot-based data persistence. A dataset snapshot will be taken every N secs if there are at least M writes changes in the dataset. |
39+
| tls_mode | 'enabled'<br /> **'disabled'** <br />'replica_ssl' | Encrypt communication |

0 commit comments

Comments
 (0)