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. */
| 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. */ |
| 70 | void 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. */ |
| 79 | unsigned long aofRewriteBufferSize(void) { |
no test coverage detected