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

Function scanLaterZset

src/defrag.cpp:522–530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

520}
521
522long scanLaterZset(robj *ob, unsigned long *cursor) {
523 if (ob->type != OBJ_ZSET || ob->encoding != OBJ_ENCODING_SKIPLIST)
524 return 0;
525 zset *zs = (zset*)ptrFromObj(ob);
526 dict *d = zs->dict;
527 scanLaterZsetData data = {zs, 0};
528 *cursor = dictScan(d, *cursor, scanLaterZsetCallback, defragDictBucketCallback, &data);
529 return data.defragged;
530}
531
532void scanLaterSetCallback(void *privdata, const dictEntry *_de) {
533 dictEntry *de = (dictEntry*)_de;

Callers 1

defragLaterItemFunction · 0.85

Calls 2

ptrFromObjFunction · 0.85
dictScanFunction · 0.85

Tested by

no test coverage detected