Discussion:
[redis-db] ZPOPMIN command behaves inconsistently with the doc
s***@gmail.com
2018-10-24 02:10:11 UTC
Permalink
Hi,

In order to support Redis 5.0, I'm trying to add ZPOPMIN/MAX and
BZPOPMIN/MAX commands to my C++ Redis client
<https://github.com/sewenew/redis-plus-plus>. However, *I found these
commands behave inconsistently with the doc
<https://redis.io/commands/bzpopmax>*.

From the doc, the return value of the command is a three-element multi-bulk
with the second element being the score, and the third element being the
member. The doc also gives an example for the command with the specified
order.

However, when I sent these commands to Redis 5.0, *the elements of the
returned tuple have a different order*: the second element being the
member, and the third element being the score.

So, which one is the correct behavior? Since it's not a good idea to change
the API of a client library in the future, could you confirm the correct
behavior for me?

Thanks,

sewenew
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Itamar Haber
2018-10-24 11:36:11 UTC
Permalink
Hello sewenew,

That is correct, and there is an open PR (
https://github.com/antirez/redis-doc/pull/997) to fix the confusion.

Be seeing you on SO,
Post by s***@gmail.com
Hi,
In order to support Redis 5.0, I'm trying to add ZPOPMIN/MAX and
BZPOPMIN/MAX commands to my C++ Redis client
<https://github.com/sewenew/redis-plus-plus>. However, *I found these
commands behave inconsistently with the doc
<https://redis.io/commands/bzpopmax>*.
From the doc, the return value of the command is a three-element
multi-bulk with the second element being the score, and the third element
being the member. The doc also gives an example for the command with the
specified order.
However, when I sent these commands to Redis 5.0, *the elements of the
returned tuple have a different order*: the second element being the
member, and the third element being the score.
So, which one is the correct behavior? Since it's not a good idea to
change the API of a client library in the future, could you confirm the
correct behavior for me?
Thanks,
sewenew
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
*Itamar Haber*
Technicalist Evangely

Phone: +972.54.567.9692

[image: Redis Labs] <https://redislabs.com/>
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Loading...