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
a77f836e
Commit
a77f836e
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
0f0610eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/t_stream.c
View file @
a77f836e
...
@@ -2134,7 +2134,6 @@ void xclaimCommand(client *c) {
...
@@ -2134,7 +2134,6 @@ void xclaimCommand(client *c) {
streamConsumer *consumer = streamLookupConsumer(group,c->argv[3]->ptr,1);
streamConsumer *consumer = streamLookupConsumer(group,c->argv[3]->ptr,1);
void *arraylenptr = addDeferredMultiBulkLength(c);
void *arraylenptr = addDeferredMultiBulkLength(c);
size_t arraylen = 0;
size_t arraylen = 0;
long long dirty = server.dirty;
for (int j = 5; j <= last_id_arg; j++) {
for (int j = 5; j <= last_id_arg; j++) {
streamID id;
streamID id;
unsigned char buf[sizeof(streamID)];
unsigned char buf[sizeof(streamID)];
...
@@ -2199,10 +2198,11 @@ void xclaimCommand(client *c) {
...
@@ -2199,10 +2198,11 @@ void xclaimCommand(client *c) {
/* Propagate this change. */
/* Propagate this change. */
streamPropagateXCLAIM(c,c->argv[1],group,c->argv[2],c->argv[j],nack);
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++;
server.dirty++;
}
}
}
}
if (
server.dirty == dirty &&
propagate_last_id) {
if (propagate_last_id) {
streamPropagateGroupID(c,c->argv[1],group,c->argv[2]);
streamPropagateGroupID(c,c->argv[1],group,c->argv[2]);
server.dirty++;
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