-
Notifications
You must be signed in to change notification settings - Fork 550
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
Add support for multi-shard commands. #900
Conversation
a7a8cb6
to
302f2cc
Compare
c979c81
to
b21dac3
Compare
@jaymell rebased |
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 this looks good, but not gonna lie, trying to read through a few parts of this was pretty cumbersome. I'm not sure if it's possible to make things any more readable, so just asking for a couple of comments on the denser parts for the benefit of anyone who has to look through it again later.
This allows the async cluster client to split keyed commands so that keys will be grouped by the slot they belong in, and sent only to the relevant shard.
Add documentation, add a test, and change `multi_shard` to use 0-indexing on the result.
@jaymell I added docs, a sample test, and slightly changed the implementation of |
Thanks for adding the comments! As for the actual code changes, I'll leave it up to you. If you think the code was more robust prior to the latest changes, for feel free to revert them. Otherwise let's go ahead and merge! |
Hey, does this mean that pipelines using key on different shards are working with async cluster? |
no, it doesn't. |
This PR is based over #888 .
This allows the async cluster client to split keyed commands so that
keys will be grouped by the slot they belong in, and sent only to the
relevant shard.