From 78202f843f44e057722bec6f86b5863a9e4d4418 Mon Sep 17 00:00:00 2001 From: Binbin Date: Mon, 24 Apr 2023 13:20:00 +0800 Subject: [PATCH] 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 --- src/server.c | 2 ++ 1 file changed, 2 insertions(+) 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; } }