From 1fd53af71b5a2f7a07b30b2e6565b24135ca0380 Mon Sep 17 00:00:00 2001 From: John Sully Date: Wed, 30 Sep 2020 20:12:54 +0000 Subject: [PATCH] Fix stream replication failure with active replication, issue #238 Former-commit-id: a41366cc3a6568c0249a5ee022e517add55e286d --- src/t_stream.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/t_stream.cpp b/src/t_stream.cpp index b54df9c71..fd7a1329b 100644 --- a/src/t_stream.cpp +++ b/src/t_stream.cpp @@ -43,6 +43,7 @@ void streamFreeCG(streamCG *cg); void streamFreeNACK(streamNACK *na); size_t streamReplyWithRangeFromConsumerPEL(client *c, stream *s, streamID *start, streamID *end, size_t count, streamConsumer *consumer); +bool FInReplicaReplay(); /* ----------------------------------------------------------------------- * Low level stream encoding: a radix tree of listpacks. @@ -838,6 +839,9 @@ void streamPropagateXCLAIM(client *c, robj *key, streamCG *group, robj *groupnam * * Note that JUSTID is useful in order to avoid that XCLAIM will do * useless work in the replica side, trying to fetch the stream item. */ + if (FInReplicaReplay()) + return; + robj *argv[14]; argv[0] = createStringObject("XCLAIM",6); argv[1] = key;