mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
ZPOP: fix replication of blocking ZPOP.
This commit is contained in:
parent
e87c1f1e6c
commit
25f017e563
@ -333,10 +333,18 @@ void handleClientsBlockedOnKeys(void) {
|
|||||||
unblockClient(receiver);
|
unblockClient(receiver);
|
||||||
genericZpopCommand(receiver,&rl->key,1,where,1,NULL);
|
genericZpopCommand(receiver,&rl->key,1,where,1,NULL);
|
||||||
|
|
||||||
propagate(where == ZSET_MIN ?
|
/* Replicate the command. */
|
||||||
server.zpopminCommand : server.zpopmaxCommand,
|
robj *argv[2];
|
||||||
receiver->db->id,receiver->argv,receiver->argc,
|
struct redisCommand *cmd = where == ZSET_MIN ?
|
||||||
PROPAGATE_AOF|PROPAGATE_REPL);
|
server.zpopminCommand :
|
||||||
|
server.zpopmaxCommand;
|
||||||
|
argv[0] = createStringObject(cmd->name,strlen(cmd->name));
|
||||||
|
argv[1] = rl->key;
|
||||||
|
incrRefCount(rl->key);
|
||||||
|
propagate(cmd,receiver->db->id,
|
||||||
|
argv,2,PROPAGATE_AOF|PROPAGATE_REPL);
|
||||||
|
decrRefCount(argv[0]);
|
||||||
|
decrRefCount(argv[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user