diff options
author | Johannes Truschnigg <johannes@truschnigg.info> | 2019-12-19 21:47:24 +0100 |
---|---|---|
committer | Johannes Truschnigg <johannes@truschnigg.info> | 2019-12-19 21:47:24 +0100 |
commit | dfb598cf3304818e608ceb6b5d9529a293345c4a (patch) | |
tree | 906934a0158335b4292dde5897135a2a5c43ba5c /src | |
parent | d3a9dff6b95eb2ec16e432dd102202694dfc285a (diff) | |
download | redis-dfb598cf3304818e608ceb6b5d9529a293345c4a.tar.gz |
Signal systemd readiness atfer Partial Resync
"Partial Resynchronization" is a special variant of replication success
that we have to tell systemd about if it is managing redis-server via a
Type=Notify service unit.
Diffstat (limited to 'src')
-rw-r--r-- | src/replication.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/replication.c b/src/replication.c index 68dc77a61..01619810c 100644 --- a/src/replication.c +++ b/src/replication.c @@ -2172,6 +2172,10 @@ void syncWithMaster(connection *conn) { if (psync_result == PSYNC_CONTINUE) { serverLog(LL_NOTICE, "MASTER <-> REPLICA sync: Master accepted a Partial Resynchronization."); + if (server.supervised_mode == SUPERVISED_SYSTEMD) { + redisCommunicateSystemd("STATUS=MASTER <-> REPLICA sync: Partial Resynchronization accepted. Ready to accept connections.\n"); + redisCommunicateSystemd("READY=1\n"); + } return; } |