diff options
author | Håkon Hallingstad <hakon@verizonmedia.com> | 2021-03-19 21:55:42 +0100 |
---|---|---|
committer | Håkon Hallingstad <hakon@verizonmedia.com> | 2021-03-19 21:55:42 +0100 |
commit | 2d16332e15d66e23dcfb51dabe329c82a02e1eff (patch) | |
tree | 481efef4682a89fef2e509279eb62c29055d34d8 /clustercontroller-apps | |
parent | 1ff6fa617f45cef77e97ba76750c476de48271c1 (diff) |
Increase the minimum time before first cluster state broadcast [run-systemtest]
Diffstat (limited to 'clustercontroller-apps')
-rw-r--r-- | clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurer.java | 17 |
1 files changed, 14 insertions, 3 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 c6a2ecc0c1c..9dbe5212f8c 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 @@ -79,11 +79,8 @@ public class ClusterControllerClusterConfigurer { options.minRatioOfDistributorNodesUp = config.min_distributor_up_ratio(); options.minRatioOfStorageNodesUp = config.min_storage_up_ratio(); options.cycleWaitTime = (int) (config.cycle_wait_time() * 1000); - options.minTimeBeforeFirstSystemStateBroadcast = (int) (config.min_time_before_first_system_state_broadcast() * 1000); - options.nodeStateRequestTimeoutMS = (int) (config.get_node_state_request_timeout() * 1000); options.showLocalSystemStatesInEventLog = config.show_local_systemstates_in_event_log(); options.minTimeBetweenNewSystemStates = config.min_time_between_new_systemstates(); - 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))); @@ -93,6 +90,20 @@ public class ClusterControllerClusterConfigurer { options.clusterFeedBlockEnabled = config.enable_cluster_feed_block(); options.clusterFeedBlockLimit = Map.copyOf(config.cluster_feed_block_limit()); options.clusterFeedBlockNoiseLevel = config.cluster_feed_block_noise_level(); + + // minTimeBeforeFirstSystemStateBroadcast is the minimum time the CC will wait for the storage + // nodes and distributors being down in Slobrok and/or getnodestate, before being allowed to + // broadcast a cluster state. We therefore force a longer timeout depending on related settings. + options.maxSlobrokDisconnectGracePeriod = (int) (config.max_slobrok_disconnect_grace_period() * 1000); + options.nodeStateRequestTimeoutMS = (int) (config.get_node_state_request_timeout() * 1000); + options.minTimeBeforeFirstSystemStateBroadcast = max( + options.maxSlobrokDisconnectGracePeriod, + options.nodeStateRequestTimeoutMS, + (int) (config.min_time_before_first_system_state_broadcast() * 1000)); + } + + private static int max(int a, int b, int c) { + return Math.max(a, Math.max(b, c)); } private static void configure(FleetControllerOptions options, SlobroksConfig config) { |