Fix stream replication failure with active replication, issue #238

Former-commit-id: a41366cc3a6568c0249a5ee022e517add55e286d
This commit is contained in:
John Sully 2020-09-30 20:12:54 +00:00
parent 4f18a247e3
commit 1fd53af71b

View File

@ -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;