File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
content/develop/reference/modules Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -7843,9 +7843,6 @@ position so it can later use [`RedisModule_DefragCursorGet()`](#RedisModule_Defr
78437843When stopped and more work is left to be done, the callback should
78447844return 1. Otherwise, it should return 0.
78457845
7846- NOTE: Modules should consider the frequency in which this function is called,
7847- so it generally makes sense to do small batches of work in between calls.
7848-
78497846<span id =" RedisModule_DefragCursorSet " ></span >
78507847
78517848### ` RedisModule_DefragCursorSet `
@@ -7976,8 +7973,9 @@ on the Redis side is dropped as soon as the command callback returns).
79767973Defragment a Redis Module Dictionary by scanning its contents and calling a value
79777974callback for each value.
79787975
7979- The callback gets the current value in the dict, and should return non-NULL with a new pointer,
7976+ The callback gets the current value in the dict, and should update newptr to the new pointer,
79807977if the value was re-allocated to a different address. The callback also gets the key name just as a reference.
7978+ The callback returns 0 when defrag is complete for this node, 1 when node needs more work.
79817979
79827980The API can work incrementally by accepting a seek position to continue from, and
79837981returning the next position to seek to on the next call (or return NULL when the iteration is completed).
You can’t perform that action at this time.
0 commit comments