Why there isn't `ZPOPMAX` in Sorted Set?
See original GitHub issueI’d like to pop the value with the max score, but redis-py does not have zpopmax nor zpopmin.
So what are the suitable replaces of ZPOPMAX and ZPOPMIN?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Why there isn't ZPOPMAX in Sorted Set? #1003 - GitHub
I'd like to pop the value with the max score, but redis-py does not have zpopmax nor zpopmin. So what are the suitable...
Read more >Is there good way to support pop members from the Redis ...
What I figured out for poping message from the Redis Sorted Set is using ZRANGE +ZREM , however it is not thread security...
Read more >How to get highest score element of a sorted set – Redis ...
ZPOPMAX Command This command removes and returns one or more highest score elements from the sorted set value stored at a specified key....
Read more >ANTIREZ on Twitter: "5) Sorted sets are now like lists! They ...
We release every 1 / 1.5 years more or less, there is no point in saying 3.2 ... ZPOPMAX. Remove and return members...
Read more >ZADD - Redis
Sorted sets are sorted by their score in an ascending way. The same element only exists a single time, no repeated elements are...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

See this?. Zpopmin and Zpopmax is new command in redis 5.0.0, maybe the command is in developing. I use
zrevrange('yourkey', 0, 1)to get the max value and thenzrem('yourkey')to delete the element.You need to use both pipelining AND transactions. Pipelining just ensures that the commands are executed in order and also reduces the RTT(Round Trip Time). Transactions are the ones that ensure atomicity of the commands in execution.