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
820b1e6e
Commit
820b1e6e
authored
Oct 15, 2018
by
antirez
Browse files
Streams: better naming: lastid_updated -> propagate_last_id.
See #5437 but also I updated a previous usage of the same var name.
parent
440574d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/t_stream.c
View file @
820b1e6e
...
...
@@ -896,7 +896,7 @@ size_t streamReplyWithRange(client *c, stream *s, streamID *start, streamID *end
streamIterator si;
int64_t numfields;
streamID id;
int
lastid_update
d = 0;
int
propagate_last_i
d = 0;
/* If a group was passed, we check if the request is about messages
* never delivered so far (normally this happens when ">" ID is passed).
...
...
@@ -918,7 +918,7 @@ size_t streamReplyWithRange(client *c, stream *s, streamID *start, streamID *end
/* Update the group last_id if needed. */
if (group && streamCompareID(&id,&group->last_id) > 0) {
group->last_id = id;
lastid_update
d = 1;
propagate_last_i
d = 1;
}
/* Emit a two elements array for each item. The first is
...
...
@@ -983,7 +983,7 @@ size_t streamReplyWithRange(client *c, stream *s, streamID *start, streamID *end
decrRefCount(idarg);
}
} else {
if (
lastid_update
d)
if (
propagate_last_i
d)
streamPropagateGroupID(c,spi->keyname,group,spi->groupname);
}
...
...
@@ -2076,7 +2076,7 @@ void xclaimCommand(client *c) {
* are trailing options. */
time_t now = mstime();
streamID last_id = {0,0};
int
lastid_update
d = 0;
int
propagate_last_i
d = 0;
for (; j < c->argc; j++) {
int moreargs = (c->argc-1) - j; /* Number of additional arguments. */
char *opt = c->argv[j]->ptr;
...
...
@@ -2111,7 +2111,7 @@ void xclaimCommand(client *c) {
if (streamCompareID(&last_id,&group->last_id) > 0) {
group->last_id = last_id;
lastid_update
d = 1;
propagate_last_i
d = 1;
}
if (deliverytime != -1) {
...
...
@@ -2202,7 +2202,7 @@ void xclaimCommand(client *c) {
server.dirty++;
}
}
if (server.dirty == dirty &&
lastid_update
d) {
if (server.dirty == dirty &&
propagate_last_i
d) {
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