summaryrefslogtreecommitdiffstats
path: root/container-core/src/main/java/com/yahoo/container/jdisc/state
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2020-07-02 11:54:43 +0200
committerJon Bratseth <bratseth@gmail.com>2020-07-02 11:54:43 +0200
commiteb37f7dcbd89143715fbe9b838a91b296db0a3c9 (patch)
treea065cc8ffe0bee8fc9022fd32a926ff5712542c6 /container-core/src/main/java/com/yahoo/container/jdisc/state
parentb4abecef92c802ee6f779dc77d4328cc6fbf22cb (diff)
Improvements to handling of cluster removal
- Don't change health status to "initializing" when creating a new VipStatus, as 'initializing' now requires all clusters to be up to transition to 'up', which means that if we're already up but are missing a cluster we'll go from 'up' to 'initializing' and stay there. - Forget up/down status for removed clusters. - Nicer logging on ignorable reconfiguration errors.
Diffstat (limited to 'container-core/src/main/java/com/yahoo/container/jdisc/state')
-rw-r--r--container-core/src/main/java/com/yahoo/container/jdisc/state/StateMonitor.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/container-core/src/main/java/com/yahoo/container/jdisc/state/StateMonitor.java b/container-core/src/main/java/com/yahoo/container/jdisc/state/StateMonitor.java
index 78b65622150..0018dd22dd9 100644
--- a/container-core/src/main/java/com/yahoo/container/jdisc/state/StateMonitor.java
+++ b/container-core/src/main/java/com/yahoo/container/jdisc/state/StateMonitor.java
@@ -47,11 +47,13 @@ public class StateMonitor extends AbstractComponent {
@Inject
public StateMonitor(HealthMonitorConfig config, Timer timer) {
- this(config, timer, runnable -> {
- Thread thread = new Thread(runnable, "StateMonitor");
- thread.setDaemon(true);
- return thread;
- });
+ this(config,
+ timer,
+ runnable -> {
+ Thread thread = new Thread(runnable, "StateMonitor");
+ thread.setDaemon(true);
+ return thread;
+ });
}
StateMonitor(HealthMonitorConfig config, Timer timer, ThreadFactory threadFactory) {
@@ -59,7 +61,8 @@ public class StateMonitor extends AbstractComponent {
Status.valueOf(config.initialStatus()),
timer, threadFactory);
}
- /* For Testing */
+
+ /* Public for testing only */
public StateMonitor(long snapshotIntervalMS, Status status, Timer timer, ThreadFactory threadFactory) {
this.timer = timer;
this.snapshotIntervalMs = snapshotIntervalMS;