MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / zuiClearIterator

Function zuiClearIterator

src/t_zset.cpp:2107–2132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2105}
2106
2107void zuiClearIterator(zsetopsrc *op) {
2108 if (op->subject == NULL)
2109 return;
2110
2111 if (op->type == OBJ_SET) {
2112 iterset *it = &op->iter.set;
2113 if (op->encoding == OBJ_ENCODING_INTSET) {
2114 UNUSED(it); /* skip */
2115 } else if (op->encoding == OBJ_ENCODING_HT) {
2116 dictReleaseIterator(it->ht.di);
2117 } else {
2118 serverPanic("Unknown set encoding");
2119 }
2120 } else if (op->type == OBJ_ZSET) {
2121 iterzset *it = &op->iter.iterzset;
2122 if (op->encoding == OBJ_ENCODING_ZIPLIST) {
2123 UNUSED(it); /* skip */
2124 } else if (op->encoding == OBJ_ENCODING_SKIPLIST) {
2125 UNUSED(it); /* skip */
2126 } else {
2127 serverPanic("Unknown sorted set encoding");
2128 }
2129 } else {
2130 serverPanic("Unsupported type");
2131 }
2132}
2133
2134unsigned long zuiLength(zsetopsrc *op) {
2135 if (op->subject == NULL)

Callers 3

zdiffAlgorithm1Function · 0.85
zdiffAlgorithm2Function · 0.85

Calls 1

dictReleaseIteratorFunction · 0.70

Tested by

no test coverage detected