mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 08:08:53 -05:00
block: propagate BRPOPLPUSH as RPOPLPUSH when unblock
This commit is contained in:
parent
2c970532dc
commit
6b056d29f3
@ -2464,6 +2464,7 @@ void initServerConfig(void) {
|
||||
server.pexpireCommand = lookupCommandByCString("pexpire");
|
||||
server.xclaimCommand = lookupCommandByCString("xclaim");
|
||||
server.xgroupCommand = lookupCommandByCString("xgroup");
|
||||
server.rpoplpushCommand = lookupCommandByCString("rpoplpush");
|
||||
|
||||
/* Slow log */
|
||||
server.slowlog_log_slower_than = CONFIG_DEFAULT_SLOWLOG_LOG_SLOWER_THAN;
|
||||
|
@ -1159,7 +1159,7 @@ struct redisServer {
|
||||
*lpopCommand, *rpopCommand, *zpopminCommand,
|
||||
*zpopmaxCommand, *sremCommand, *execCommand,
|
||||
*expireCommand, *pexpireCommand, *xclaimCommand,
|
||||
*xgroupCommand;
|
||||
*xgroupCommand, *rpoplpushCommand;
|
||||
/* Fields used only for stats */
|
||||
time_t stat_starttime; /* Server start time */
|
||||
long long stat_numcommands; /* Number of processed commands */
|
||||
|
17
src/t_list.c
17
src/t_list.c
@ -653,20 +653,13 @@ int serveClientBlockedOnList(client *receiver, robj *key, robj *dstkey, redisDb
|
||||
if (!(dstobj &&
|
||||
checkType(receiver,dstobj,OBJ_LIST)))
|
||||
{
|
||||
/* Propagate the RPOP operation. */
|
||||
argv[0] = shared.rpop;
|
||||
argv[1] = key;
|
||||
propagate(server.rpopCommand,
|
||||
db->id,argv,2,
|
||||
PROPAGATE_AOF|
|
||||
PROPAGATE_REPL);
|
||||
rpoplpushHandlePush(receiver,dstkey,dstobj,
|
||||
value);
|
||||
/* Propagate the LPUSH operation. */
|
||||
argv[0] = shared.lpush;
|
||||
argv[1] = dstkey;
|
||||
argv[2] = value;
|
||||
propagate(server.lpushCommand,
|
||||
/* Propagate the RPOPLPUSH operation. */
|
||||
argv[0] = shared.rpoplpush;
|
||||
argv[1] = key;
|
||||
argv[2] = dstkey;
|
||||
propagate(server.rpoplpushCommand,
|
||||
db->id,argv,3,
|
||||
PROPAGATE_AOF|
|
||||
PROPAGATE_REPL);
|
||||
|
Loading…
Reference in New Issue
Block a user