diff options
author | Geir Storli <geirst@verizonmedia.com> | 2021-10-04 12:50:42 +0000 |
---|---|---|
committer | Geir Storli <geirst@verizonmedia.com> | 2021-10-04 12:50:42 +0000 |
commit | fffcf762930b0119199622750658ebd3ab3703c4 (patch) | |
tree | c128eedbc481423ec3df1d246989d631def837cd /config-model/src/main | |
parent | 3f68eb7eb2f03020bed40f328294a0c9300fa17e (diff) |
Add feature flag for distributor merge busy wait.
Diffstat (limited to 'config-model/src/main')
-rw-r--r-- | config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java | 9 | ||||
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/content/DistributorCluster.java | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java b/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java index e27e0e7624f..570638e7e93 100644 --- a/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java +++ b/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java @@ -65,6 +65,7 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea private double minNodeRatioPerGroup = 0.0; private boolean containerDumpHeapOnShutdownTimeout = false; private double containerShutdownTimeout = 50.0; + private int distributorMergeBusyWait = 10; @Override public ModelContext.FeatureFlags featureFlags() { return this; } @Override public boolean multitenant() { return multitenant; } @@ -109,6 +110,9 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea @Override public int metricsproxyNumThreads() { return 1; } @Override public double containerShutdownTimeout() { return containerShutdownTimeout; } @Override public boolean containerDumpHeapOnShutdownTimeout() { return containerDumpHeapOnShutdownTimeout; } + @Override public int distributorMergeBusyWait() { return distributorMergeBusyWait; } + + public TestProperties containerDumpHeapOnShutdownTimeout(boolean value) { containerDumpHeapOnShutdownTimeout = value; return this; @@ -266,6 +270,11 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea return this; } + public TestProperties setDistributorMergeBusyWait(int value) { + distributorMergeBusyWait = value; + return this; + } + public static class Spec implements ConfigServerSpec { private final String hostName; diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/DistributorCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/content/DistributorCluster.java index 0e3fee5a749..3fab1adde57 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/content/DistributorCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/content/DistributorCluster.java @@ -43,6 +43,7 @@ public class DistributorCluster extends AbstractConfigProducer<Distributor> impl private final boolean hasIndexedDocumentType; private final boolean useThreePhaseUpdates; private final int maxActivationInhibitedOutOfSyncGroups; + private final int mergeBusyWait; public static class Builder extends VespaDomBuilder.DomConfigProducerBuilder<DistributorCluster> { @@ -105,18 +106,20 @@ public class DistributorCluster extends AbstractConfigProducer<Distributor> impl final boolean hasIndexedDocumentType = clusterContainsIndexedDocumentType(documentsNode); boolean useThreePhaseUpdates = deployState.getProperties().featureFlags().useThreePhaseUpdates(); int maxInhibitedGroups = deployState.getProperties().featureFlags().maxActivationInhibitedOutOfSyncGroups(); + int mergeBusyWait = deployState.getProperties().featureFlags().distributorMergeBusyWait(); return new DistributorCluster(parent, new BucketSplitting.Builder().build(new ModelElement(producerSpec)), gc, hasIndexedDocumentType, useThreePhaseUpdates, - maxInhibitedGroups); + maxInhibitedGroups, mergeBusyWait); } } private DistributorCluster(ContentCluster parent, BucketSplitting bucketSplitting, GcOptions gc, boolean hasIndexedDocumentType, boolean useThreePhaseUpdates, - int maxActivationInhibitedOutOfSyncGroups) + int maxActivationInhibitedOutOfSyncGroups, + int mergeBusyWait) { super(parent, "distributor"); this.parent = parent; @@ -125,6 +128,7 @@ public class DistributorCluster extends AbstractConfigProducer<Distributor> impl this.hasIndexedDocumentType = hasIndexedDocumentType; this.useThreePhaseUpdates = useThreePhaseUpdates; this.maxActivationInhibitedOutOfSyncGroups = maxActivationInhibitedOutOfSyncGroups; + this.mergeBusyWait = mergeBusyWait; } @Override @@ -138,6 +142,7 @@ public class DistributorCluster extends AbstractConfigProducer<Distributor> impl builder.disable_bucket_activation(hasIndexedDocumentType == false); builder.enable_metadata_only_fetch_phase_for_inconsistent_updates(useThreePhaseUpdates); builder.max_activation_inhibited_out_of_sync_groups(maxActivationInhibitedOutOfSyncGroups); + builder.inhibit_merge_sending_on_busy_node_duration_sec(mergeBusyWait); bucketSplitting.getConfig(builder); } |