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
c479eace
Commit
c479eace
authored
Apr 17, 2020
by
antirez
Browse files
Fix XCLAIM propagation in AOF/replicas for blocking XREADGROUP.
See issue #7105.
parent
002052f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/server.c
View file @
c479eace
...
@@ -3082,8 +3082,13 @@ struct redisCommand *lookupCommandOrOriginal(sds name) {
...
@@ -3082,8 +3082,13 @@ struct redisCommand *lookupCommandOrOriginal(sds name) {
* + PROPAGATE_AOF (propagate into the AOF file if is enabled)
* + PROPAGATE_AOF (propagate into the AOF file if is enabled)
* + PROPAGATE_REPL (propagate into the replication link)
* + PROPAGATE_REPL (propagate into the replication link)
*
*
* This should not be used inside commands implementation. Use instead
* This should not be used inside commands implementation since it will not
* alsoPropagate(), preventCommandPropagation(), forceCommandPropagation().
* wrap the resulting commands in MULTI/EXEC. Use instead alsoPropagate(),
* preventCommandPropagation(), forceCommandPropagation().
*
* However for functions that need to (also) propagate out of the context of a
* command execution, for example when serving a blocked client, you
* want to use propagate().
*/
*/
void
propagate
(
struct
redisCommand
*
cmd
,
int
dbid
,
robj
**
argv
,
int
argc
,
void
propagate
(
struct
redisCommand
*
cmd
,
int
dbid
,
robj
**
argv
,
int
argc
,
int
flags
)
int
flags
)
...
...
src/t_stream.c
View file @
c479eace
...
@@ -848,7 +848,7 @@ void streamPropagateXCLAIM(client *c, robj *key, streamCG *group, robj *groupnam
...
@@ -848,7 +848,7 @@ void streamPropagateXCLAIM(client *c, robj *key, streamCG *group, robj *groupnam
argv
[
11
]
=
createStringObject
(
"JUSTID"
,
6
);
argv
[
11
]
=
createStringObject
(
"JUSTID"
,
6
);
argv
[
12
]
=
createStringObject
(
"LASTID"
,
6
);
argv
[
12
]
=
createStringObject
(
"LASTID"
,
6
);
argv
[
13
]
=
createObjectFromStreamID
(
&
group
->
last_id
);
argv
[
13
]
=
createObjectFromStreamID
(
&
group
->
last_id
);
alsoP
ropagate
(
server
.
xclaimCommand
,
c
->
db
->
id
,
argv
,
14
,
PROPAGATE_AOF
|
PROPAGATE_REPL
);
p
ropagate
(
server
.
xclaimCommand
,
c
->
db
->
id
,
argv
,
14
,
PROPAGATE_AOF
|
PROPAGATE_REPL
);
decrRefCount
(
argv
[
0
]);
decrRefCount
(
argv
[
0
]);
decrRefCount
(
argv
[
3
]);
decrRefCount
(
argv
[
3
]);
decrRefCount
(
argv
[
4
]);
decrRefCount
(
argv
[
4
]);
...
...
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