redis / jedis

Redis Java client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Jedis 4.4.7 MultiNodePipeline binary command version of zrevrangeByScore is broken

keeferrourke opened this issue · comments

Expected behavior

Pipelining using Jedis in cluster mode should return non-empty results when calling zrevrangeByScore on a key.

Actual behavior

An empty list is always returned because the min / max arguments are flipped.

return appendCommand(commandObjects.zrevrangeByScore(key, min, max));

This is similar to #827.

Steps to reproduce:

Please create a reproducible case of your problem. Make sure
that case repeats consistently and it's not random.

In a pipeline:

  1. zadd("key", 1.0, "a")
  2. zrevrangeByScore("key".getBytes(), "-10.0".getBytes(), "10.0".getBytes())

The command that is supposed to be sent is ZREVRANGEBYSCORE key -10.0 10.0.

What is actually sent is ZREVRANGEBYSCORE key 10.0 -10.0.

Redis / Jedis Configuration

Jedis version: 4.4.6, but also present in 4.4.7.

Redis version: 7.0.10

Java version: 17

Fixed by #3784.

Thanks @keeferrourke for reporting.