Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
6b056d29
Commit
6b056d29
authored
Nov 22, 2019
by
zhaozhao.zz
Browse files
block: propagate BRPOPLPUSH as RPOPLPUSH when unblock
parent
2c970532
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/server.c
View file @
6b056d29
...
@@ -2464,6 +2464,7 @@ void initServerConfig(void) {
...
@@ -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
;
...
...
src/server.h
View file @
6b056d29
...
@@ -1159,7 +1159,7 @@ struct redisServer {
...
@@ -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 */
...
...
src/t_list.c
View file @
6b056d29
...
@@ -653,20 +653,13 @@ int serveClientBlockedOnList(client *receiver, robj *key, robj *dstkey, redisDb
...
@@ -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
RPOP
LPUSH operation. */
argv
[
0
]
=
shared
.
lpush
;
argv
[
0
]
=
shared
.
rpop
lpush
;
argv
[
1
]
=
dst
key
;
argv
[
1
]
=
key
;
argv
[
2
]
=
value
;
argv
[
2
]
=
dstkey
;
propagate
(
server
.
lpushCommand
,
propagate
(
server
.
rpop
lpushCommand
,
db
->
id
,
argv
,
3
,
db
->
id
,
argv
,
3
,
PROPAGATE_AOF
|
PROPAGATE_AOF
|
PROPAGATE_REPL
);
PROPAGATE_REPL
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment