summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBinbin <binloveplay1314@qq.com>2023-04-24 13:20:00 +0800
committerGitHub <noreply@github.com>2023-04-24 08:20:00 +0300
commit78202f843f44e057722bec6f86b5863a9e4d4418 (patch)
tree80a28e73b5632b4ca7394458797ce30838a1cd4a
parente289798483f492a613f85454a6b51de2f22b41cc (diff)
downloadredis-78202f843f44e057722bec6f86b5863a9e4d4418.tar.gz
Report AOF failure status to systemd in shutdown (#12065)
Since we do report the RDB error in below: ``` serverLog(LL_WARNING,"Error trying to save the DB, can't exit."); if (server.supervised_mode == SUPERVISED_SYSTEMD) redisCommunicateSystemd("STATUS=Error trying to save the DB, can't exit.\n"); goto error; ``` This may be an overlook in #6052
-rw-r--r--src/server.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/server.c b/src/server.c
index 71a15e2b8..401f63293 100644
--- a/src/server.c
+++ b/src/server.c
@@ -4331,6 +4331,8 @@ int finishShutdown(void) {
serverLog(LL_WARNING, "Writing initial AOF. Exit anyway.");
} else {
serverLog(LL_WARNING, "Writing initial AOF, can't exit.");
+ if (server.supervised_mode == SUPERVISED_SYSTEMD)
+ redisCommunicateSystemd("STATUS=Writing initial AOF, can't exit.\n");
goto error;
}
}