diff options
author | Håkon Hallingstad <hakon@verizonmedia.com> | 2020-01-17 12:39:12 +0100 |
---|---|---|
committer | Håkon Hallingstad <hakon@verizonmedia.com> | 2020-01-17 12:39:12 +0100 |
commit | c28f13dac59167dee1257f5b23835e6441bc5f31 (patch) | |
tree | 7910cb0ce12e37b7af828c3b13c14b84cbcb0105 /configserver | |
parent | b324c19e007a7a57ba731ed72a01d35cd6937ed7 (diff) |
Use bucket_space metric in retirement
This makes the Cluster Controller use the
vds.datastored.bucket_space.buckets_total, dimension bucketSpace=default, to
determine whether a content node manages zero buckets, and if so, will allow
the node to go permanently down. This is used when a node is retiring, and it
is to be removed from the application.
The change is guarded by the use-bucket-space-metric, default true. If the new
metric doesn't work as expected, we can revert to using the current/old metric
by flipping the flag. The flag can be controlled per application.
Diffstat (limited to 'configserver')
-rw-r--r-- | configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ModelContextImpl.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ModelContextImpl.java b/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ModelContextImpl.java index 694ab8f037e..52d47a9398b 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ModelContextImpl.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ModelContextImpl.java @@ -132,6 +132,7 @@ public class ModelContextImpl implements ModelContext { private final boolean useAdaptiveDispatch; private final Optional<TlsSecrets> tlsSecrets; private final double defaultTermwiseLimit; + private final boolean useBucketSpaceMetric; public Properties(ApplicationId applicationId, boolean multitenantFromConfig, @@ -162,6 +163,8 @@ public class ModelContextImpl implements ModelContext { this.tlsSecrets = tlsSecrets; defaultTermwiseLimit = Flags.DEFAULT_TERM_WISE_LIMIT.bindTo(flagSource) .with(FetchVector.Dimension.APPLICATION_ID, applicationId.serializedForm()).value(); + this.useBucketSpaceMetric = Flags.USE_BUCKET_SPACE_METRIC.bindTo(flagSource) + .with(FetchVector.Dimension.APPLICATION_ID, applicationId.serializedForm()).value(); } @Override @@ -209,6 +212,9 @@ public class ModelContextImpl implements ModelContext { @Override public double defaultTermwiseLimit() { return defaultTermwiseLimit; } + + @Override + public boolean useBucketSpaceMetric() { return useBucketSpaceMetric; } } } |