diff options
author | Jon Bratseth <bratseth@oath.com> | 2021-06-29 10:09:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-29 10:09:22 +0200 |
commit | 81059f0b04a1146033db04015d7797f1504dd4be (patch) | |
tree | 58fdbfc81b5a4b99ff39a71d88651271285396e1 /controller-server | |
parent | fcda3fe473cc3b5639feda0e474cb31549713134 (diff) | |
parent | 5e0d7c9657b7a388955b5eef80f85b162b5139a6 (diff) |
Merge pull request #18444 from vespa-engine/mpolden/check-shutdown
Return from slow loop when shutting down
Diffstat (limited to 'controller-server')
-rw-r--r-- | controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/TrafficShareUpdater.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/TrafficShareUpdater.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/TrafficShareUpdater.java index 0af0d01478b..8c891339e29 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/TrafficShareUpdater.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/TrafficShareUpdater.java @@ -1,7 +1,6 @@ // Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.hosted.controller.maintenance; -import com.yahoo.config.provision.SystemName; import com.yahoo.vespa.hosted.controller.ApplicationController; import com.yahoo.vespa.hosted.controller.Controller; import com.yahoo.vespa.hosted.controller.Instance; @@ -30,7 +29,7 @@ public class TrafficShareUpdater extends ControllerMaintainer { private final NodeRepository nodeRepository; public TrafficShareUpdater(Controller controller, Duration duration) { - super(controller, duration, TrafficShareUpdater.class.getSimpleName(), SystemName.all()); + super(controller, duration); this.applications = controller.applications(); this.nodeRepository = controller.serviceRegistry().configServer().nodeRepository(); } @@ -44,7 +43,7 @@ public class TrafficShareUpdater extends ControllerMaintainer { for (var instance : application.instances().values()) { for (var deployment : instance.deployments().values()) { if ( ! deployment.zone().environment().isProduction()) continue; - + if (shuttingDown()) return 1.0; try { attempts++; updateTrafficFraction(instance, deployment); |