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

Function bgrewriteaofCommand

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

Source from the content-addressed store, hash-verified

1804}
1805
1806void bgrewriteaofCommand(client *c) {
1807 if (server.child_type == CHILD_TYPE_AOF) {
1808 addReplyError(c,"Background append only file rewriting already in progress");
1809 } else if (hasActiveChildProcess()) {
1810 server.aof_rewrite_scheduled = 1;
1811 addReplyStatus(c,"Background append only file rewriting scheduled");
1812 } else if (rewriteAppendOnlyFileBackground() == C_OK) {
1813 addReplyStatus(c,"Background append only file rewriting started");
1814 } else {
1815 addReplyError(c,"Can't execute an AOF background rewriting. "
1816 "Please check the server logs for more information.");
1817 }
1818}
1819
1820void aofRemoveTempFile(pid_t childpid) {
1821 char tmpfile[256];

Callers

nothing calls this directly

Calls 4

addReplyErrorFunction · 0.85
hasActiveChildProcessFunction · 0.85
addReplyStatusFunction · 0.85

Tested by

no test coverage detected