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
0b1784b1
Commit
0b1784b1
authored
Oct 15, 2018
by
antirez
Browse files
Streams: use propagate_last_id itself as streamPropagateGroupID trigger.
Avoid storing the dirty value. See #5437.
parent
820b1e6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/t_stream.c
View file @
0b1784b1
...
...
@@ -2134,7 +2134,6 @@ void xclaimCommand(client *c) {
streamConsumer
*
consumer
=
streamLookupConsumer
(
group
,
c
->
argv
[
3
]
->
ptr
,
1
);
void
*
arraylenptr
=
addDeferredMultiBulkLength
(
c
);
size_t
arraylen
=
0
;
long
long
dirty
=
server
.
dirty
;
for
(
int
j
=
5
;
j
<=
last_id_arg
;
j
++
)
{
streamID
id
;
unsigned
char
buf
[
sizeof
(
streamID
)];
...
...
@@ -2199,10 +2198,11 @@ void xclaimCommand(client *c) {
/* Propagate this change. */
streamPropagateXCLAIM
(
c
,
c
->
argv
[
1
],
group
,
c
->
argv
[
2
],
c
->
argv
[
j
],
nack
);
propagate_last_id
=
0
;
/* Will be propagated by XCLAIM itself. */
server
.
dirty
++
;
}
}
if
(
server
.
dirty
==
dirty
&&
propagate_last_id
)
{
if
(
propagate_last_id
)
{
streamPropagateGroupID
(
c
,
c
->
argv
[
1
],
group
,
c
->
argv
[
2
]);
server
.
dirty
++
;
}
...
...
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