Skip to content

Commit b990e9f

Browse files
authored
Expand docs about multi-shard (#2493)
Add example and more details about multi-shard request policy in command tips page.
1 parent 7c5a901 commit b990e9f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/reference/command-tips.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ In cases where the client should adopt a behavior different than the default, th
5050
This tip is in-use by commands that don't accept key name arguments.
5151
The command operates atomically per shard.
5252
- **multi_shard:** the client should execute the command on several shards.
53-
The shards that execute the command are determined by the hash slots of its input key name arguments.
53+
The client should split the inputs according to the hash slots of its input key name arguments.
54+
For example, the command `DEL {foo} {foo}1 bar` should be split to `DEL {foo} {foo}1` and `DEL bar`.
55+
If the keys are hashed to more than a single slot, the command must be split even if all the slots are managed by the same shard.
5456
Examples for such commands include `MSET`, `MGET` and `DEL`.
5557
However, note that `SUNIONSTORE` isn't considered as _multi_shard_ because all of its keys must belong to the same hash slot.
5658
- **special:** indicates a non-trivial form of the client's request policy, such as the `SCAN` command.

0 commit comments

Comments
 (0)