MCPcopy Create free account
hub / github.com/F-Stack/f-stack / aofRewriteBufferReset

Function aofRewriteBufferReset

app/redis-6.2.6/src/aof.c:70–76  ·  view source on GitHub ↗

This function free the old AOF rewrite buffer if needed, and initialize * a fresh new one. It tests for server.aof_rewrite_buf_blocks equal to NULL * so can be used for the first initialization as well. */

Source from the content-addressed store, hash-verified

68 * a fresh new one. It tests for server.aof_rewrite_buf_blocks equal to NULL
69 * so can be used for the first initialization as well. */
70void aofRewriteBufferReset(void) {
71 if (server.aof_rewrite_buf_blocks)
72 listRelease(server.aof_rewrite_buf_blocks);
73
74 server.aof_rewrite_buf_blocks = listCreate();
75 listSetFreeMethod(server.aof_rewrite_buf_blocks,zfree);
76}
77
78/* Return the current size of the AOF rewrite buffer. */
79unsigned long aofRewriteBufferSize(void) {

Callers 3

initServerFunction · 0.85
killAppendOnlyChildFunction · 0.85

Calls 2

listReleaseFunction · 0.85
listCreateFunction · 0.85

Tested by

no test coverage detected