| 1927 | } |
| 1928 | |
| 1929 | void bgrewriteaofCommand(client *c) { |
| 1930 | if (g_pserver->child_type == CHILD_TYPE_AOF) { |
| 1931 | addReplyError(c,"Background append only file rewriting already in progress"); |
| 1932 | } else if (hasActiveChildProcessOrBGSave()) { |
| 1933 | g_pserver->aof_rewrite_scheduled = 1; |
| 1934 | addReplyStatus(c,"Background append only file rewriting scheduled"); |
| 1935 | } else if (rewriteAppendOnlyFileBackground() == C_OK) { |
| 1936 | addReplyStatus(c,"Background append only file rewriting started"); |
| 1937 | } else { |
| 1938 | addReplyError(c,"Can't execute an AOF background rewriting. " |
| 1939 | "Please check the server logs for more information."); |
| 1940 | } |
| 1941 | } |
| 1942 | |
| 1943 | void aofRemoveTempFile(pid_t childpid) { |
| 1944 | char tmpfile[256]; |
nothing calls this directly
no test coverage detected