From d126aa85a14029fb46c66163172a2e8ea50386a7 Mon Sep 17 00:00:00 2001 From: Tor Brede Vekterli Date: Tue, 20 Aug 2024 14:15:30 +0200 Subject: [PATCH] Always set metric update cycle counter after updating Only setting the counter in the master CC branch means that metric updating would be done for _every_ tick on failover controllers rather than for every 300 ticks. --- .../com/yahoo/vespa/clustercontroller/core/FleetController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/FleetController.java b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/FleetController.java index 6731a8c38617..b83b6b0deeb2 100644 --- a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/FleetController.java +++ b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/FleetController.java @@ -374,12 +374,12 @@ private boolean maybePublishOldMetrics() { metricUpdater.updateClusterStateMetrics(cluster, baselineState, ResourceUsageStats.calculateFrom(cluster.getNodeInfos(), options.clusterFeedBlockLimit(), stateBundle.getFeedBlock()), systemStateBroadcaster.getLastStateBroadcastTimePoint()); - lastMetricUpdateCycleCount = cycleCount; } else { // If we're not the master we don't have any authoritative information about // how out of sync the cluster nodes are, so reset the metric. metricUpdater.updateClusterBucketsOutOfSyncRatio(0); } + lastMetricUpdateCycleCount = cycleCount; return true; } else { return false;