"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/defrag.c" between
redis-6.2-rc3.tar.gz and redis-6.2.0.tar.gz

About: redis is an advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.

defrag.c  (redis-6.2-rc3):defrag.c  (redis-6.2.0)
skipping to change at line 641 skipping to change at line 641
int defragRaxNode(raxNode **noderef) { int defragRaxNode(raxNode **noderef) {
raxNode *newnode = activeDefragAlloc(*noderef); raxNode *newnode = activeDefragAlloc(*noderef);
if (newnode) { if (newnode) {
*noderef = newnode; *noderef = newnode;
return 1; return 1;
} }
return 0; return 0;
} }
/* returns 0 if no more work needs to be been done, and 1 if time is up and more work is needed. */ /* returns 0 if no more work needs to be been done, and 1 if time is up and more work is needed. */
int scanLaterStraemListpacks(robj *ob, unsigned long *cursor, long long endtime, long long *defragged) { int scanLaterStreamListpacks(robj *ob, unsigned long *cursor, long long endtime, long long *defragged) {
static unsigned char last[sizeof(streamID)]; static unsigned char last[sizeof(streamID)];
raxIterator ri; raxIterator ri;
long iterations = 0; long iterations = 0;
if (ob->type != OBJ_STREAM || ob->encoding != OBJ_ENCODING_STREAM) { if (ob->type != OBJ_STREAM || ob->encoding != OBJ_ENCODING_STREAM) {
*cursor = 0; *cursor = 0;
return 0; return 0;
} }
stream *s = ob->ptr; stream *s = ob->ptr;
raxStart(&ri,s->rax); raxStart(&ri,s->rax);
skipping to change at line 961 skipping to change at line 961
robj *ob = dictGetVal(de); robj *ob = dictGetVal(de);
if (ob->type == OBJ_LIST) { if (ob->type == OBJ_LIST) {
return scanLaterList(ob, cursor, endtime, &server.stat_active_defrag _hits); return scanLaterList(ob, cursor, endtime, &server.stat_active_defrag _hits);
} else if (ob->type == OBJ_SET) { } else if (ob->type == OBJ_SET) {
server.stat_active_defrag_hits += scanLaterSet(ob, cursor); server.stat_active_defrag_hits += scanLaterSet(ob, cursor);
} else if (ob->type == OBJ_ZSET) { } else if (ob->type == OBJ_ZSET) {
server.stat_active_defrag_hits += scanLaterZset(ob, cursor); server.stat_active_defrag_hits += scanLaterZset(ob, cursor);
} else if (ob->type == OBJ_HASH) { } else if (ob->type == OBJ_HASH) {
server.stat_active_defrag_hits += scanLaterHash(ob, cursor); server.stat_active_defrag_hits += scanLaterHash(ob, cursor);
} else if (ob->type == OBJ_STREAM) { } else if (ob->type == OBJ_STREAM) {
return scanLaterStraemListpacks(ob, cursor, endtime, &server.stat_ac tive_defrag_hits); return scanLaterStreamListpacks(ob, cursor, endtime, &server.stat_ac tive_defrag_hits);
} else if (ob->type == OBJ_MODULE) { } else if (ob->type == OBJ_MODULE) {
return moduleLateDefrag(dictGetKey(de), ob, cursor, endtime, &server .stat_active_defrag_hits); return moduleLateDefrag(dictGetKey(de), ob, cursor, endtime, &server .stat_active_defrag_hits);
} else { } else {
*cursor = 0; /* object type may have changed since we schedule it fo r later */ *cursor = 0; /* object type may have changed since we schedule it fo r later */
} }
} else { } else {
*cursor = 0; /* object may have been deleted already */ *cursor = 0; /* object may have been deleted already */
} }
return 0; return 0;
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)