MCPcopy Create free account
hub / github.com/F-Stack/f-stack / defragStreamConsumerPendingEntry

Function defragStreamConsumerPendingEntry

app/redis-6.2.6/src/defrag.c:731–745  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

729} PendingEntryContext;
730
731void* defragStreamConsumerPendingEntry(raxIterator *ri, void *privdata, long *defragged) {
732 UNUSED(defragged);
733 PendingEntryContext *ctx = privdata;
734 streamNACK *nack = ri->data, *newnack;
735 nack->consumer = ctx->c; /* update nack pointer to consumer */
736 newnack = activeDefragAlloc(nack);
737 if (newnack) {
738 /* update consumer group pointer to the nack */
739 void *prev;
740 raxInsert(ctx->cg->pel, ri->key, ri->key_len, newnack, &prev);
741 serverAssert(prev==nack);
742 /* note: we don't increment 'defragged' that's done by the caller */
743 }
744 return newnack;
745}
746
747void* defragStreamConsumer(raxIterator *ri, void *privdata, long *defragged) {
748 streamConsumer *c = ri->data;

Callers

nothing calls this directly

Calls 2

activeDefragAllocFunction · 0.85
raxInsertFunction · 0.85

Tested by

no test coverage detected