diff options
author | antirez <antirez@gmail.com> | 2019-09-27 12:03:09 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2019-09-27 12:03:09 +0200 |
commit | de1f82aa3302461c21f6cfcb8e8972e865b02174 (patch) | |
tree | 10137b03577deb48edd48c6db7b7da7c6c9eebef /src/aof.c | |
parent | 82845f8d045a1fdbac17cf1959ad51906a8840ed (diff) | |
download | redis-de1f82aa3302461c21f6cfcb8e8972e865b02174.tar.gz |
Function renamed hasForkChild() -> hasActiveChildProcess().
Diffstat (limited to 'src/aof.c')
-rw-r--r-- | src/aof.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -264,7 +264,7 @@ int startAppendOnly(void) { strerror(errno)); return C_ERR; } - if (hasForkChild() && server.aof_child_pid == -1) { + if (hasActiveChildProcess() && server.aof_child_pid == -1) { server.aof_rewrite_scheduled = 1; serverLog(LL_WARNING,"AOF was enabled but there is already another background operation. An AOF background was scheduled to start when possible."); } else { @@ -395,7 +395,7 @@ void flushAppendOnlyFile(int force) { * useful for graphing / monitoring purposes. */ if (sync_in_progress) { latencyAddSampleIfNeeded("aof-write-pending-fsync",latency); - } else if (hasForkChild()) { + } else if (hasActiveChildProcess()) { latencyAddSampleIfNeeded("aof-write-active-child",latency); } else { latencyAddSampleIfNeeded("aof-write-alone",latency); @@ -491,7 +491,7 @@ void flushAppendOnlyFile(int force) { try_fsync: /* Don't fsync if no-appendfsync-on-rewrite is set to yes and there are * children doing I/O in the background. */ - if (server.aof_no_fsync_on_rewrite && hasForkChild()) + if (server.aof_no_fsync_on_rewrite && hasActiveChildProcess()) return; /* Perform the fsync if needed. */ @@ -1563,7 +1563,7 @@ void aofClosePipes(void) { int rewriteAppendOnlyFileBackground(void) { pid_t childpid; - if (hasForkChild()) return C_ERR; + if (hasActiveChildProcess()) return C_ERR; if (aofCreatePipes() != C_OK) return C_ERR; openChildInfoPipe(); if ((childpid = redisFork()) == 0) { @@ -1607,7 +1607,7 @@ int rewriteAppendOnlyFileBackground(void) { void bgrewriteaofCommand(client *c) { if (server.aof_child_pid != -1) { addReplyError(c,"Background append only file rewriting already in progress"); - } else if (hasForkChild()) { + } else if (hasActiveChildProcess()) { server.aof_rewrite_scheduled = 1; addReplyStatus(c,"Background append only file rewriting scheduled"); } else if (rewriteAppendOnlyFileBackground() == C_OK) { |