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
Java: Add BZMPOP
command
#1390
Java: Add BZMPOP
command
#1390
Conversation
* Add `BZMPOP` command. Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> * Add a test. Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> * Address PR comments. Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> * Reorder args. Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> * Groom glide core. Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> * Update glide-core/src/client/value_conversion.rs Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> Co-authored-by: jonathanl-bq <72158117+jonathanl-bq@users.noreply.github.com> --------- Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> Co-authored-by: jonathanl-bq <72158117+jonathanl-bq@users.noreply.github.com>
…MPOP Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
…MPOP Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
java/client/src/main/java/glide/api/commands/SortedSetBaseCommands.java
Outdated
Show resolved
Hide resolved
java/client/src/main/java/glide/api/commands/SortedSetBaseCommands.java
Outdated
Show resolved
Hide resolved
java/client/src/main/java/glide/api/commands/SortedSetBaseCommands.java
Outdated
Show resolved
Hide resolved
/** | ||
* Blocks the connection until it pops and returns multiple member-score pairs from the sorted | ||
* sets stored at the specified <code>keys</code>. The sorted sets are checked in the order they | ||
* are provided.<br> |
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.
Do we want to clarify the following? It was something I wasn't sure about until I saw it in the redis.io docs
* are provided.<br> | |
* are provided. The number of popped elements is the minimum | |
from the sorted set's cardinality and `count`.<br> |
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.
Too obvious isn't it? What others think?
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. Either way, not a big deal, you can decide if you want to include it or not
java/client/src/main/java/glide/api/commands/SortedSetBaseCommands.java
Outdated
Show resolved
Hide resolved
java/client/src/main/java/glide/api/commands/SortedSetBaseCommands.java
Outdated
Show resolved
Hide resolved
java/client/src/main/java/glide/api/commands/SortedSetBaseCommands.java
Outdated
Show resolved
Hide resolved
I implemented this for Python (PR is not up yet) and the transaction tests were failing with a cross slot error. This was because BZMPOP needs to be added to cluster_routing.rs#base_routing, since it doesn't fall under the default FirstKey category. Mapping BZMPOP to ThirdArgAfterKeyCount locally solved the problem for me. Do you know why the transaction tests are passing here even though cluster_routing.rs hasn't been updated for BZMPOP yet? |
No idea. I know, few tests in #1284 fail which pass here. Looking forward to run tests with fixed routing. |
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
…MPOP Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
…MPOP Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
java/client/src/main/java/glide/api/models/commands/ScoreModifier.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> Co-authored-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
* Java: Add `BZMPOP` command (#194) * Add `BZMPOP` command. Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> * Add a test. Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> * Address PR comments. Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> * Reorder args. Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> * Groom glide core. Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> * Update glide-core/src/client/value_conversion.rs Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> Co-authored-by: jonathanl-bq <72158117+jonathanl-bq@users.noreply.github.com> --------- Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> Co-authored-by: jonathanl-bq <72158117+jonathanl-bq@users.noreply.github.com> * Address PR comments. Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> * Update glide-core/src/client/value_conversion.rs Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> Co-authored-by: Andrew Carbonetto <andrew.carbonetto@improving.com> * Rename Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> --------- Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> Co-authored-by: jonathanl-bq <72158117+jonathanl-bq@users.noreply.github.com> Co-authored-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
Issue #, if available:
N/A
Description of changes:
https://redis.io/commands/bzmpop/
Ref: #1255 and #1248
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.