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

Function defragStreamConsumer

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

Source from the content-addressed store, hash-verified

745}
746
747void* defragStreamConsumer(raxIterator *ri, void *privdata, long *defragged) {
748 streamConsumer *c = ri->data;
749 streamCG *cg = privdata;
750 void *newc = activeDefragAlloc(c);
751 if (newc) {
752 /* note: we don't increment 'defragged' that's done by the caller */
753 c = newc;
754 }
755 sds newsds = activeDefragSds(c->name);
756 if (newsds)
757 (*defragged)++, c->name = newsds;
758 if (c->pel) {
759 PendingEntryContext pel_ctx = {cg, c};
760 *defragged += defragRadixTree(&c->pel, 0, defragStreamConsumerPendingEntry, &pel_ctx);
761 }
762 return newc; /* returns NULL if c was not defragged */
763}
764
765void* defragStreamConsumerGroup(raxIterator *ri, void *privdata, long *defragged) {
766 streamCG *cg = ri->data;

Callers

nothing calls this directly

Calls 3

activeDefragAllocFunction · 0.85
activeDefragSdsFunction · 0.85
defragRadixTreeFunction · 0.85

Tested by

no test coverage detected