From b1875177198959710d9c9a348eb9f116b797b6bc Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 30 Sep 2013 10:13:33 +0200 Subject: [PATCH] Cluster: when upading the configEpoch for a node, save config on disk ASAP. --- src/cluster.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cluster.c b/src/cluster.c index 4751c78f..f0a6ddeb 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -924,8 +924,10 @@ int clusterProcessPacket(clusterLink *link) { if (senderCurrentEpoch > server.cluster->currentEpoch) server.cluster->currentEpoch = senderCurrentEpoch; /* Update the sender configEpoch if it is publishing a newer one. */ - if (senderConfigEpoch > sender->configEpoch) + if (senderConfigEpoch > sender->configEpoch) { sender->configEpoch = senderConfigEpoch; + clusterSaveConfigOrDie(); + } } /* Process packets by type. */