-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Fix multi-shard explanation. #2493
Conversation
👷 Deploy request for redis-doc pending review.Visit the deploys page to approve it
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@itamarhaber PATL
docs/reference/command-tips.md
Outdated
@@ -50,7 +50,7 @@ In cases where the client should adopt a behavior different than the default, th | |||
This tip is in-use by commands that don't accept key name arguments. | |||
The command operates atomically per shard. | |||
- **multi_shard:** the client should execute the command on several shards. | |||
The shards that execute the command are determined by the hash slots of its input key name arguments. | |||
The client should split the inputs according to the hash slots of its input key name arguments. For example, the command `MSET {foo} baz {foo}1 baz1 bar vaz` should be split to `MSET {foo} baz {foo}1 baz1` and `MSET bar vaz`. 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe an example with DEL will be easier to follow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I intentionally chose MSET, because it's slightly more complex than MGET / DEL. If you think that the phrasing and principle are clear enough that a less complex example would work, I'll switch to DEL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think the principle is clear enough with DEL and MGET and it'll be easier to read.
it's right that the implementation in case of MSET is more complex, but that's something to worry about in implementation stage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
I merged this now. Thanks! I have two other questions regarding the multi-shard request policy:
|
No description provided.