summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2020-04-24 10:13:20 +0200
committerantirez <antirez@gmail.com>2020-04-24 10:13:36 +0200
commita3ca53e4a792a5da18444fb587531029ed62f99b (patch)
treee8b25a73adc3e780bd8d357e6316b68476357b70
parent7a62eb96ef31dd36b78274f4c921799fc0588be3 (diff)
downloadredis-a3ca53e4a792a5da18444fb587531029ed62f99b.tar.gz
Also use propagate() in streamPropagateGroupID().
-rw-r--r--src/t_stream.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/t_stream.c b/src/t_stream.c
index 8cc5b2ee2..2cf229b2f 100644
--- a/src/t_stream.c
+++ b/src/t_stream.c
@@ -842,6 +842,11 @@ void streamPropagateXCLAIM(client *c, robj *key, streamCG *group, robj *groupnam
argv[11] = createStringObject("JUSTID",6);
argv[12] = createStringObject("LASTID",6);
argv[13] = createObjectFromStreamID(&group->last_id);
+
+ /* We use progagate() because this code path is not always called from
+ * the command execution context. Moreover this will just alter the
+ * consumer group state, and we don't need MULTI/EXEC wrapping because
+ * there is no message state cross-message atomicity required. */
propagate(server.xclaimCommand,c->db->id,argv,14,PROPAGATE_AOF|PROPAGATE_REPL);
decrRefCount(argv[0]);
decrRefCount(argv[3]);
@@ -869,7 +874,12 @@ void streamPropagateGroupID(client *c, robj *key, streamCG *group, robj *groupna
argv[2] = key;
argv[3] = groupname;
argv[4] = createObjectFromStreamID(&group->last_id);
- alsoPropagate(server.xgroupCommand,c->db->id,argv,5,PROPAGATE_AOF|PROPAGATE_REPL);
+
+ /* We use progagate() because this code path is not always called from
+ * the command execution context. Moreover this will just alter the
+ * consumer group state, and we don't need MULTI/EXEC wrapping because
+ * there is no message state cross-message atomicity required. */
+ propagate(server.xgroupCommand,c->db->id,argv,5,PROPAGATE_AOF|PROPAGATE_REPL);
decrRefCount(argv[0]);
decrRefCount(argv[1]);
decrRefCount(argv[4]);