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

Upgrade to Jedis 5.0 #2716

Closed
wants to merge 9 commits into from
Closed

Upgrade to Jedis 5.0 #2716

wants to merge 9 commits into from

Conversation

jxblum
Copy link
Contributor

@jxblum jxblum commented Sep 25, 2023

See #2612

Refactor, organize source and fix compiler warnings.
…ests in JedisClusterConnectionTests.

Jedis 5.0 changed the bzpopmax and bzpopmin Redis commands to no longer return an empty (Array)List internally when evaluating and popping from an empty sorted set. A NullPointerException will be thrown if either bzpopmax or bzpopmin commands are executd on an empty Redis sorted set in Jedis 5.0 (vs. Jedis 4.x):

Caused by: java.lang.NullPointerException: Cannot invoke 'java.util.List.isEmpty()' because l is null:
  at redis.clients.jedis.BuilderFactory7.build(BuilderFactory.java:616)

This seems like a bug in Jedis. It is safe to execute zcard(key) to return the cardinality of (number of elements in) the sorted set before the test executes, ensuring a clean, reliable run.

Closes #2612
@jxblum jxblum added type: dependency-upgrade A dependency upgrade in: jedis Jedis driver labels Sep 25, 2023
Closes #2612
Original pull request: #2716
christophstrobl pushed a commit that referenced this pull request Oct 4, 2023
Adapt to API changes in the Jedis 5.0 driver.
Fix bzPopMaxShouldWorkCorrectly() and bzPopMinShouldWorkCorrectly() tests in JedisClusterConnectionTests.

Jedis 5.0 changed the bzpopmax and bzpopmin Redis commands to no longer return an empty (Array)List internally when evaluating and popping from an empty sorted set. A NullPointerException will be thrown if either bzpopmax or bzpopmin commands are executd on an empty Redis sorted set in Jedis 5.0 (vs. Jedis 4.x):

Closes #2612
Original pull request: #2716
@jxblum jxblum force-pushed the main branch 2 times, most recently from d43adc9 to a71f042 Compare October 18, 2023 03:07
@mp911de
Copy link
Member

mp911de commented Dec 14, 2023

That's merged via f97bd87 and 2075633

@mp911de mp911de closed this Dec 14, 2023
@mp911de mp911de deleted the issue/2612 branch December 14, 2023 07:55
@mp911de mp911de added this to the 3.2 GA (2023.1.0) milestone Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: jedis Jedis driver type: dependency-upgrade A dependency upgrade
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants