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.
This commit is contained in:
antirez 2013-02-26 11:08:03 +01:00
parent 9cb578ced0
commit d5e8b0a47f

View File

@ -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