summaryrefslogtreecommitdiff
path: root/src/aof.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2019-09-27 12:03:09 +0200
committerantirez <antirez@gmail.com>2019-09-27 12:03:09 +0200
commitde1f82aa3302461c21f6cfcb8e8972e865b02174 (patch)
tree10137b03577deb48edd48c6db7b7da7c6c9eebef /src/aof.c
parent82845f8d045a1fdbac17cf1959ad51906a8840ed (diff)
downloadredis-de1f82aa3302461c21f6cfcb8e8972e865b02174.tar.gz
Function renamed hasForkChild() -> hasActiveChildProcess().
Diffstat (limited to 'src/aof.c')
-rw-r--r--src/aof.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/aof.c b/src/aof.c
index 8bc6c543d..4e6af7c1c 100644
--- a/src/aof.c
+++ b/src/aof.c
@@ -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) {