mirror of
https://github.com/fluencelabs/redis
synced 2025-06-18 11:41:20 +00:00
ZPOP: change sync ZPOP to have a count argument instead of N keys.
Usually blocking operations make a lot of sense with multiple keys so that we can listen to multiple queues (or whatever the app models) with a single connection. However in the synchronous case it is more useful to be able to ask for N elements. This is a change that I also wanted to perform soon or later in the blocking list variant, but here it is more natural since there is no reply type difference.
This commit is contained in:
@ -331,7 +331,7 @@ void handleClientsBlockedOnKeys(void) {
|
||||
receiver->lastcmd->proc == bzpopminCommand)
|
||||
? ZSET_MIN : ZSET_MAX;
|
||||
unblockClient(receiver);
|
||||
genericZpopCommand(receiver,&rl->key,1,where);
|
||||
genericZpopCommand(receiver,&rl->key,1,where,1,NULL);
|
||||
|
||||
propagate(where == ZSET_MIN ?
|
||||
server.zpopminCommand : server.zpopmaxCommand,
|
||||
|
Reference in New Issue
Block a user