From d5e8b0a47fa84debb9b0b5b2ce617b3739c04245 Mon Sep 17 00:00:00 2001 From: antirez Date: Tue, 26 Feb 2013 11:08:03 +0100 Subject: [PATCH] Cluster: cleanup idle failure reports every time we remove one. This is not very important as anyway when the function counting the number of reports is called the cleanup is performed. However with this change if only part of the nodes that reported the failure will report the node is back ok, we'll cleanup the older entries ASAP. In complex split net split scenarios, and when we are dealing with clusters having nodes in the order of ~ 1000, this can save some CPU. --- src/cluster.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cluster.c b/src/cluster.c index c832d870..897079c4 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -398,6 +398,7 @@ void clusterNodeDelFailureReport(clusterNode *node, clusterNode *sender) { /* Remove the failure report. */ listDelNode(l,ln); + clusterNodeCleanupFailureReports(node); } /* Remove failure reports that are too old, where too old means reasonably