Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Incorrect element order on CLI output for ZPOPMAX and ZPOPMIN #171

Open
defterade opened this issue Feb 28, 2019 · 2 comments
Open

Incorrect element order on CLI output for ZPOPMAX and ZPOPMIN #171

defterade opened this issue Feb 28, 2019 · 2 comments

Comments

@defterade
Copy link

Shown on website:

redis> ZADD myzset 3 "three"
(integer) 1
redis> ZPOPMAX myzset
1) "3"
2) "three"
redis> 

Expected output:

redis> ZADD myzset 3 "three"
(integer) 1
redis> ZPOPMAX myzset
1) "three"
2) "3"
redis>
@alviezhang
Copy link

alviezhang commented Nov 22, 2019

Same issue. This would cause a problem when I execute this script:

redis.call('ZADD', 'test', '1.0', 'a', '2.0', 'b')
local values = redis.call('ZPOPMIN', 'test', 2)
redis.call('ZADD', 'test', unpack(values))

@itamarhaber
Copy link
Member

I believe that the documentation has been fixed and now provides the correct order of arguments - please confirm.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants