summaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-07-01 17:41:48 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2022-07-01 17:46:23 +0200
commit8f34f88420fd9ec3a606f3bd4d658962625f16af (patch)
tree5eebeeb2c7140d1dda0ac1186e6083d912486664 /config-model/src/main/java/com
parentf93384bd529fdacfc0103f008a6a6babe46e494c (diff)
Add feature flag control of dispatching.
Diffstat (limited to 'config-model/src/main/java/com')
-rw-r--r--config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java27
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/content/ContentNode.java12
2 files changed, 39 insertions, 0 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 b59395bafaa..5f189a63701 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
@@ -78,6 +78,10 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea
private boolean enableBitVectors = false;
private boolean loadCodeAsHugePages = false;
private boolean sharedStringRepoNoReclaim = false;
+ private boolean mbus_dispatch_on_decode = true;
+ private boolean mbus_dispatch_on_encode = true;
+ private int mbus_threads = 4;
+ private int mbus_network_threads = 1;
private Architecture adminClusterNodeResourcesArchitecture = Architecture.getDefault();
@Override public ModelContext.FeatureFlags featureFlags() { return this; }
@@ -133,6 +137,11 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea
@Override public Architecture adminClusterArchitecture() { return adminClusterNodeResourcesArchitecture; }
@Override public boolean sharedStringRepoNoReclaim() { return sharedStringRepoNoReclaim; }
@Override public boolean loadCodeAsHugePages() { return loadCodeAsHugePages; }
+ @Override public boolean mbusDispatchOnDecode() { return mbus_dispatch_on_decode; }
+ @Override public boolean mbusDispatchOnEncode() { return mbus_dispatch_on_encode; }
+ @Override public int mbusNetworkThreads() { return mbus_network_threads; }
+ @Override public int mbusThreads() { return mbus_threads; }
+
public TestProperties sharedStringRepoNoReclaim(boolean sharedStringRepoNoReclaim) {
this.sharedStringRepoNoReclaim = sharedStringRepoNoReclaim;
@@ -358,6 +367,24 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea
return this;
}
+ public TestProperties setMbusDispatchOnDecode(boolean value) {
+ this.mbus_dispatch_on_decode = value;
+ return this;
+ }
+ public TestProperties setMbusDispatchOnEncode(boolean value) {
+ this.mbus_dispatch_on_encode = value;
+ return this;
+ }
+
+ public TestProperties setMbusThreads(int value) {
+ this.mbus_threads = value;
+ return this;
+ }
+
+ public TestProperties setMbusNetworkThreads(int value) {
+ this.mbus_network_threads = value;
+ return this;
+ }
public TestProperties setAdminClusterNodeResourcesArchitecture(Architecture architecture) {
this.adminClusterNodeResourcesArchitecture = architecture;
return this;
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/ContentNode.java b/config-model/src/main/java/com/yahoo/vespa/model/content/ContentNode.java
index c12a245f08d..0b0a512a1c8 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/content/ContentNode.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/content/ContentNode.java
@@ -21,11 +21,19 @@ public abstract class ContentNode extends AbstractService
private final int distributionKey;
private final String rootDirectory;
+ private final boolean dispatch_on_encode;
+ private final boolean dispatch_on_decode;
+ private final int mbus_threads;
+ private final int mbus_network_threads;
public ContentNode(ModelContext.FeatureFlags featureFlags, AbstractConfigProducer<?> parent, String clusterName, String rootDirectory, int distributionKey) {
super(parent, "" + distributionKey);
this.distributionKey = distributionKey;
this.rootDirectory = rootDirectory;
+ dispatch_on_decode = featureFlags.mbusDispatchOnDecode();
+ dispatch_on_encode = featureFlags.mbusDispatchOnEncode();
+ mbus_threads = featureFlags.mbusThreads();
+ mbus_network_threads = featureFlags.mbusNetworkThreads();
initialize();
setProp("clustertype", "content");
@@ -69,6 +77,10 @@ public abstract class ContentNode extends AbstractService
public void getConfig(StorCommunicationmanagerConfig.Builder builder) {
builder.mbusport(getRelativePort(0));
builder.rpcport(getRelativePort(1));
+ builder.mbus.dispatch_on_decode(dispatch_on_decode);
+ builder.mbus.dispatch_on_encode(dispatch_on_encode);
+ builder.mbus.num_threads(mbus_threads);
+ builder.mbus.num_network_threads(mbus_network_threads);
}
@Override