diff options
author | Martin Polden <mpolden@mpolden.no> | 2019-01-03 12:58:18 +0100 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2019-01-03 14:10:44 +0100 |
commit | 98548141e1a03c2972a47643e45ad57629e1b386 (patch) | |
tree | 4a6d71fb7358c72a590359b40b4f12db1cc122f3 | |
parent | 7d8e3ab69dff9da55078a96e86ae95da01352ec8 (diff) |
Increase allowed to fail fraction
2 files changed, 11 insertions, 11 deletions
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/NodeFailer.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/NodeFailer.java index 680a84756dc..9b18f70eb64 100644 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/NodeFailer.java +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/NodeFailer.java @@ -348,7 +348,7 @@ public class NodeFailer extends Maintainer { public enum ThrottlePolicy { - hosted(Duration.ofDays(1), 0.01, 2), + hosted(Duration.ofDays(1), 0.02, 2), disabled(Duration.ZERO, 0, 0); private final Duration throttleWindow; diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/NodeFailerTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/NodeFailerTest.java index fdce49490fa..74c11e4fd27 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/NodeFailerTest.java +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/maintenance/NodeFailerTest.java @@ -561,17 +561,17 @@ public class NodeFailerTest { { NodeFailTester tester = NodeFailTester.withNoApplications(); List<Node> readyNodes = tester.createReadyNodes(500); - List<Node> deadNodes = readyNodes.subList(0, 10); + List<Node> deadNodes = readyNodes.subList(0, 15); - // 2 hours pass, 10 nodes (2%) die + // 2 hours pass, 15 nodes (3%) die for (int minutes = 0, interval = 30; minutes < 2 * 60; minutes += interval) { tester.clock.advance(Duration.ofMinutes(interval)); tester.allNodesMakeAConfigRequestExcept(deadNodes); } tester.failer.run(); - // 1% are allowed to fail - assertEquals(5, tester.nodeRepository.getNodes(Node.State.failed).size()); - assertEquals("Throttling is indicated by the metric.", 1, tester.metric.values.get("nodeFailThrottling")); + // 2% are allowed to fail + assertEquals(10, tester.nodeRepository.getNodes(Node.State.failed).size()); + assertEquals("Throttling is indicated by the metric.", 1, tester.metric.values.get(NodeFailer.throttlingActiveMetric)); assertEquals("Throttled node failures", 5, tester.metric.values.get(NodeFailer.throttledNodeFailuresMetric)); // 6 more hours pass, no more nodes are failed @@ -580,18 +580,18 @@ public class NodeFailerTest { tester.allNodesMakeAConfigRequestExcept(deadNodes); } tester.failer.run(); - assertEquals(5, tester.nodeRepository.getNodes(Node.State.failed).size()); - assertEquals("Throttling is indicated by the metric.", 1, tester.metric.values.get("nodeFailThrottling")); + assertEquals(10, tester.nodeRepository.getNodes(Node.State.failed).size()); + assertEquals("Throttling is indicated by the metric.", 1, tester.metric.values.get(NodeFailer.throttlingActiveMetric)); assertEquals("Throttled node failures", 5, tester.metric.values.get(NodeFailer.throttledNodeFailuresMetric)); - // 18 more hours pass, 24 hours since the first 5 nodes were failed. The remaining 5 are failed + // 18 more hours pass, 24 hours since the first 10 nodes were failed. The remaining 5 are failed for (int minutes = 0, interval = 30; minutes < 18 * 60; minutes += interval) { tester.clock.advance(Duration.ofMinutes(interval)); tester.allNodesMakeAConfigRequestExcept(deadNodes); } tester.failer.run(); - assertEquals(10, tester.nodeRepository.getNodes(Node.State.failed).size()); - assertEquals("Throttling is not indicated by the metric, as no throttled attempt is made.", 0, tester.metric.values.get("nodeFailThrottling")); + assertEquals(15, tester.nodeRepository.getNodes(Node.State.failed).size()); + assertEquals("Throttling is not indicated by the metric, as no throttled attempt is made.", 0, tester.metric.values.get(NodeFailer.throttlingActiveMetric)); assertEquals("No throttled node failures", 0, tester.metric.values.get(NodeFailer.throttledNodeFailuresMetric)); } } |