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

Function aofRewriteBufferReset

src/aof.cpp: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 g_pserver->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 g_pserver->aof_rewrite_buf_blocks equal to NULL
69 * so can be used for the first initialization as well. */
70void aofRewriteBufferReset(void) {
71 if (g_pserver->aof_rewrite_buf_blocks)
72 listRelease(g_pserver->aof_rewrite_buf_blocks);
73
74 g_pserver->aof_rewrite_buf_blocks = listCreate();
75 listSetFreeMethod(g_pserver->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