Skip to content
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

Merged
merged 9 commits into from May 13, 2024
Merged

Conversation

Yury-Fridlyand
Copy link
Collaborator

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.

Yury-Fridlyand and others added 3 commits May 7, 2024 12:25
* 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>
@Yury-Fridlyand Yury-Fridlyand added the java issues and fixes related to the java client label May 7, 2024
@Yury-Fridlyand Yury-Fridlyand requested a review from a team as a code owner May 7, 2024 19:39
glide-core/src/client/value_conversion.rs 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>
Copy link
Collaborator

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

Suggested change
* are provided.<br>
* are provided. The number of popped elements is the minimum
from the sorted set's cardinality and `count`.<br>

Copy link
Collaborator Author

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?

Copy link
Collaborator

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

@aaron-congo
Copy link
Collaborator

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?

@Yury-Fridlyand
Copy link
Collaborator Author

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>
Yury-Fridlyand and others added 2 commits May 10, 2024 17:16
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>

Co-authored-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com>
@acarbonetto acarbonetto merged commit 62dbf61 into aws:main May 13, 2024
45 checks passed
@acarbonetto acarbonetto deleted the java/integ_yuryf_BZMPOP branch May 13, 2024 23:30
avifenesh pushed a commit that referenced this pull request May 14, 2024
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
java issues and fixes related to the java client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants