-
Notifications
You must be signed in to change notification settings - Fork 59
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
Python: Adds Sort command #1439
Conversation
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.
What is CME/CMD?
Why do you split cluster and standalone implementations?
Why do you not include BY
and GET
pattern options for standalone?
You should also allow specifying route for cluster commands and document it.
Please, note, default routing and response handling isn't defined in redis-rs
- this should be done prior to implementing a command.
- ASC: Sort in ascending order. | ||
- DESC: Sort in descending order. |
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.
Move this to ASC/DESC accordingly
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.
What is CME/CMD?
CMD: Cluster Mode Disable.
CME: Cluster Mode Enable.
As I wrote in the PR itself:
In CME, two arguments (BY/GET) aren't supported, so we dicided to create separate APIs for CMD and CME so in CME those 2 two won't appear as optional.
So for your questions:
Why do you split cluster and standalone implementations?
Because we want to limit this API call so the customer won't be able to send unsupported args to this function, so for ClusterClient we eliminated those BT\GET function's args.
Why do you not include BY and GET pattern options for standalone?
I do for standalone client, but not for ClusterClient, just for the reason I described.
You should also allow specifying route for cluster commands and document it.
This command operate on a specific key which like any other commands it doesn't need to get the route as an argument.
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.
Oh I see. The definition of CMD/CME answers to all of my questions.
Please, don't use it - it is not a Redis term. PR should be understandable for everyone.
Please, update PR description, and/or code comments. Add new function signatures to PR description for better explanation and examples.
I'll do another review round.
a06ee50
to
3173672
Compare
02eac42
to
75660c2
Compare
8fb41f5
to
eb38f12
Compare
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.
Please, add a TODO comment to update implementation to comply with Redis 8 and/or create a GH issue for that.
See also my nodes in #1439 (comment)
Co-authored-by: Shoham Elias <[email protected]>
Co-authored-by: Shoham Elias <[email protected]>
…ent arg to RedisClient instead of TRedisClient.
Co-authored-by: Aaron <[email protected]>
Co-authored-by: Aaron <[email protected]>
Co-authored-by: Aaron <[email protected]>
Co-authored-by: Yury-Fridlyand <[email protected]>
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 still insist on updating PR description. Please replace CME/CMD with proper naming.
Co-authored-by: Yury-Fridlyand <[email protected]>
* Adds sort command to python Co-authored-by: Yury-Fridlyand Co-authored-by: Shoham Elias Co-authored-by: Aaron Co-authored-by: ikolomi
* Adds sort command to python Co-authored-by: Yury-Fridlyand Co-authored-by: Shoham Elias Co-authored-by: Aaron Co-authored-by: ikolomi
We separated it into sort and sort_store.
In CME, two arguments (BY/GET) aren't supported, so we dicided to create separate APIs for CMD and CME so in CME those 2 two won't appear as optional.