diff options
| author | Zheng Chao <[email protected]> | 2022-11-15 19:52:12 +0800 |
|---|---|---|
| committer | Zheng Chao <[email protected]> | 2022-11-15 19:52:12 +0800 |
| commit | 7c1159f9891984b4decd47f22574fc76bf9baae8 (patch) | |
| tree | b28e1a442e94a19c25ca75a810970565a8c127f2 /docs | |
| parent | 02f3249751d306f7a180a56b87961571ede29613 (diff) | |
:art: Format Code
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/commands.md | 36 | ||||
| -rw-r--r-- | docs/design.md | 2 |
2 files changed, 22 insertions, 16 deletions
diff --git a/docs/commands.md b/docs/commands.md index 2708907..9102cd9 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -404,7 +404,7 @@ swarmkv-sync> tinfo tb-192.168.0.1 10) (integer) 20000 ``` -## Node Management +## Cluster Management ### INFO @@ -477,6 +477,26 @@ instantaneous_input_cps: 0.00 instantaneous_output_cps: 0.00 ``` +## Cluster Management + +### CLUSTER KEYS + +Syntax + +``` +CLUSTER KEYS pattern +``` +Supported glob-style patterns: + +- `h?llo` matches `hello`, `hallo` and `hxllo` +- `h*llo` matches `hllo` and `heeeello` +- `h[ae]llo` matches `hello` and `hallo,` but not `hillo` +- `h[^e]llo` matches `hallo`, `hbllo`, ... but not `hello` +- `h[a-b]llo` matches `hallo` and `hbllo` + +Use `\` to escape special characters if you want to match them verbatim. +The pattern is exactly same as Redis https://redis.io/commands/keys/ . + ## Quick List @@ -524,17 +544,3 @@ NOTE: - Most of SwarmKV commands are identical the [Redis Commands](https://redis.io/commands/). - CLUSTER commands are used for maintainance and debugging purpose, and only available in *swarmkv-cli*. -## CLUSTER KEYS - -Supported glob-style patterns: - -- `h?llo` matches `hello`, `hallo` and `hxllo` -- `h*llo` matches `hllo` and `heeeello` -- `h[ae]llo` matches `hello` and `hallo,` but not `hillo` -- `h[^e]llo` matches `hallo`, `hbllo`, ... but not `hello` -- `h[a-b]llo` matches `hallo` and `hbllo` - -Use `\` to escape special characters if you want to match them verbatim. - -The pattern is exactly same as Redis https://redis.io/commands/keys/ . - diff --git a/docs/design.md b/docs/design.md index dca8c88..d1141da 100644 --- a/docs/design.md +++ b/docs/design.md @@ -98,7 +98,7 @@ Examples: The keyspace is sharding to slots and each slot is owned by one node. This information is recorded in the global shared slot table. If any node's health check failed, the cluster leader will choose a randome health node as the new slot owner. -You can use `CLUSTER ADDNODE` in swarmkv-cli for adding nodes. +You can use `CLUSTER ADDKEYOWNER` in swarmkv-cli for adding nodes. When adding a new node, the operation is **Assign slot_id from `original_node` to `new_node`**, the `swarmkv-cli` executes the following commands: |
