block: propagate BRPOPLPUSH as RPOPLPUSH when unblock
This commit is contained in:
parent
bb0183a3bf
commit
caddddcd8a
@ -2464,6 +2464,7 @@ void initServerConfig(void) {
|
|||||||
server.pexpireCommand = lookupCommandByCString("pexpire");
|
server.pexpireCommand = lookupCommandByCString("pexpire");
|
||||||
server.xclaimCommand = lookupCommandByCString("xclaim");
|
server.xclaimCommand = lookupCommandByCString("xclaim");
|
||||||
server.xgroupCommand = lookupCommandByCString("xgroup");
|
server.xgroupCommand = lookupCommandByCString("xgroup");
|
||||||
|
server.rpoplpushCommand = lookupCommandByCString("rpoplpush");
|
||||||
|
|
||||||
/* Slow log */
|
/* Slow log */
|
||||||
server.slowlog_log_slower_than = CONFIG_DEFAULT_SLOWLOG_LOG_SLOWER_THAN;
|
server.slowlog_log_slower_than = CONFIG_DEFAULT_SLOWLOG_LOG_SLOWER_THAN;
|
||||||
|
@ -1159,7 +1159,7 @@ struct redisServer {
|
|||||||
*lpopCommand, *rpopCommand, *zpopminCommand,
|
*lpopCommand, *rpopCommand, *zpopminCommand,
|
||||||
*zpopmaxCommand, *sremCommand, *execCommand,
|
*zpopmaxCommand, *sremCommand, *execCommand,
|
||||||
*expireCommand, *pexpireCommand, *xclaimCommand,
|
*expireCommand, *pexpireCommand, *xclaimCommand,
|
||||||
*xgroupCommand;
|
*xgroupCommand, *rpoplpushCommand;
|
||||||
/* Fields used only for stats */
|
/* Fields used only for stats */
|
||||||
time_t stat_starttime; /* Server start time */
|
time_t stat_starttime; /* Server start time */
|
||||||
long long stat_numcommands; /* Number of processed commands */
|
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 &&
|
if (!(dstobj &&
|
||||||
checkType(receiver,dstobj,OBJ_LIST)))
|
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,
|
rpoplpushHandlePush(receiver,dstkey,dstobj,
|
||||||
value);
|
value);
|
||||||
/* Propagate the LPUSH operation. */
|
/* Propagate the RPOPLPUSH operation. */
|
||||||
argv[0] = shared.lpush;
|
argv[0] = shared.rpoplpush;
|
||||||
argv[1] = dstkey;
|
argv[1] = key;
|
||||||
argv[2] = value;
|
argv[2] = dstkey;
|
||||||
propagate(server.lpushCommand,
|
propagate(server.rpoplpushCommand,
|
||||||
db->id,argv,3,
|
db->id,argv,3,
|
||||||
PROPAGATE_AOF|
|
PROPAGATE_AOF|
|
||||||
PROPAGATE_REPL);
|
PROPAGATE_REPL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user