diff options
author | Tor Brede Vekterli <vekterli@yahoo-inc.com> | 2017-09-21 17:41:07 +0200 |
---|---|---|
committer | Tor Brede Vekterli <vekterli@yahoo-inc.com> | 2017-09-25 16:05:23 +0200 |
commit | 8c6befb4a9fb5357d33208631cc15989dab771f7 (patch) | |
tree | 9501dda9ae920968e0a109a0922a45b3833c16aa /clustercontroller-apps/src | |
parent | debb34547c76429e8a345299e4765824903f784c (diff) |
Add configurable deadline for cluster controller tasks
Prevents an unstable cluster from potentially holding up all
container request processing threads indefinitely.
Deadline errors are translated into HTTP 504 errors to REST API clients.
Diffstat (limited to 'clustercontroller-apps/src')
-rw-r--r-- | clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurer.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurer.java b/clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurer.java index 0936f9d781a..8b80b0f7be5 100644 --- a/clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurer.java +++ b/clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurer.java @@ -10,6 +10,8 @@ import com.yahoo.cloud.config.SlobroksConfig; import com.yahoo.vespa.config.content.StorDistributionConfig; import com.yahoo.cloud.config.ZookeepersConfig; +import java.time.Duration; + /** * When the cluster controller is reconfigured, a new instance of this is created, which will propagate configured * options to receivers such as the fleet controller. @@ -70,6 +72,7 @@ public class ClusterControllerClusterConfigurer { options.maxSlobrokDisconnectGracePeriod = (int) (config.max_slobrok_disconnect_grace_period() * 1000); options.distributionBits = config.ideal_distribution_bits(); options.minNodeRatioPerGroup = config.min_node_ratio_per_group(); + options.setMaxDeferredTaskVersionWaitTime(Duration.ofMillis((int)(config.max_deferred_task_version_wait_time_sec() * 1000))); } private void configure(SlobroksConfig config) { |