Commit 896cf1a9 authored by heqin's avatar heqin Committed by antirez
Browse files

fixbug for #4545 dead loop aof rewrite

parent 5abb12e0
......@@ -1103,7 +1103,9 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
}
/* Trigger an AOF rewrite if needed */
if (server.rdb_child_pid == -1 &&
// If AOF disabled, we don't rewrite AOF file.
if (server.aof_fd != -1 &&
server.rdb_child_pid == -1 &&
server.aof_child_pid == -1 &&
server.aof_rewrite_perc &&
server.aof_current_size > server.aof_rewrite_min_size)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment