Skip to content

Commit 8527dee

Browse files
committed
Update modules-api-ref.md from script
1 parent 1db0bab commit 8527dee

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

content/develop/reference/modules/modules-api-ref.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7843,9 +7843,6 @@ position so it can later use [`RedisModule_DefragCursorGet()`](#RedisModule_Defr
78437843
When stopped and more work is left to be done, the callback should
78447844
return 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).
79767973
Defragment a Redis Module Dictionary by scanning its contents and calling a value
79777974
callback 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,
79807977
if 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

79827980
The API can work incrementally by accepting a seek position to continue from, and
79837981
returning the next position to seek to on the next call (or return NULL when the iteration is completed).

0 commit comments

Comments
 (0)