diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-10-28 17:01:57 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2020-10-28 17:01:57 +0000 |
commit | 5de88a16cb5a4f4c2f1b01539d553f871cfe5079 (patch) | |
tree | 7c41eb25725d749f02a87a433d1a32f334e7bf1c /config-model | |
parent | 02785bc255415bb26aaf57be10b4261e2ce65bc8 (diff) |
GC unused visibility-delay, fsync and compression for tls flags.
Diffstat (limited to 'config-model')
5 files changed, 10 insertions, 55 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 7628af85b52..736f2b360b6 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 @@ -39,12 +39,9 @@ public class TestProperties implements ModelContext.Properties { private boolean useThreePhaseUpdates = false; private boolean useDirectStorageApiRpc = false; private boolean useFastValueTensorImplementation = false; - private boolean tlsUseFSync = false; - private String tlsCompressionType = "NONE"; private double defaultTermwiseLimit = 1.0; private double threadPoolSizeFactor = 0.0; private double queueSizeFactor = 0.0; - private double visibilityDelay = 0.0; private String jvmGCOptions = null; private String sequencerType = "LATENCY"; private String responseSequencerType = "ADAPTIVE"; @@ -84,9 +81,6 @@ public class TestProperties implements ModelContext.Properties { @Override public boolean skipMbusRequestThread() { return false; } @Override public boolean skipMbusReplyThread() { return false; } @Override public Quota quota() { return quota; } - @Override public double visibilityDelay() { return visibilityDelay; } - @Override public boolean tlsUseFSync() { return tlsUseFSync; } - @Override public String tlsCompressionType() { return tlsCompressionType; } @Override public boolean useAccessControlTlsHandshakeClientAuth() { return useAccessControlTlsHandshakeClientAuth; } @Override public double jettyThreadpoolSizeFactor() { return jettyThreadpoolSizeFactor; } @@ -143,21 +137,6 @@ public class TestProperties implements ModelContext.Properties { return this; } - public TestProperties setTlsUseFSync(boolean useFSync) { - this.tlsUseFSync = useFSync; - return this; - } - - public TestProperties setTlsCompressionType(String type) { - this.tlsCompressionType = type; - return this; - } - - public TestProperties setVisibilityDelay(double visibilityDelay) { - this.visibilityDelay = visibilityDelay; - return this; - } - public TestProperties setMultitenant(boolean multitenant) { this.multitenant = multitenant; return this; diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java index 2c158e89ff7..7c057264204 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java @@ -200,7 +200,6 @@ public class ContentSearchCluster extends AbstractConfigProducer implements Prot this.flushOnShutdown = flushOnShutdown; this.combined = combined; feedSequencerType = convertFeedSequencerType(featureFlags.feedSequencerType()); - visibilityDelay = featureFlags.visibilityDelay(); } public void setVisibilityDelay(double delay) { @@ -268,7 +267,7 @@ public class ContentSearchCluster extends AbstractConfigProducer implements Prot searchNode.setHostResource(node.getHostResource()); searchNode.initService(deployState.getDeployLogger()); - tls = new TransactionLogServer(searchNode, clusterName, deployState.getProperties()); + tls = new TransactionLogServer(searchNode, clusterName); tls.setHostResource(searchNode.getHostResource()); tls.initService(deployState.getDeployLogger()); } else { diff --git a/config-model/src/main/java/com/yahoo/vespa/model/search/TransactionLogServer.java b/config-model/src/main/java/com/yahoo/vespa/model/search/TransactionLogServer.java index 347250176e5..65aa32c255c 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/search/TransactionLogServer.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/search/TransactionLogServer.java @@ -16,8 +16,6 @@ import org.w3c.dom.Element; public class TransactionLogServer extends AbstractService { private static final long serialVersionUID = 1L; - private final boolean useFSync; - private final TranslogserverConfig.Compression.Type.Enum compressionType; private static TranslogserverConfig.Compression.Type.Enum convertCompressionType(String type) { try { @@ -27,13 +25,11 @@ public class TransactionLogServer extends AbstractService { } } - public TransactionLogServer(AbstractConfigProducer searchNode, String clusterName, ModelContext.Properties featureFlags) { + public TransactionLogServer(AbstractConfigProducer searchNode, String clusterName) { super(searchNode, "transactionlogserver"); portsMeta.on(0).tag("tls"); setProp("clustername", clusterName); setProp("clustertype", "search"); - useFSync = featureFlags.tlsUseFSync(); - compressionType = convertCompressionType(featureFlags.tlsCompressionType()); } public static class Builder extends VespaDomBuilder.DomConfigProducerBuilder<TransactionLogServer> { @@ -44,7 +40,7 @@ public class TransactionLogServer extends AbstractService { @Override protected TransactionLogServer doBuild(DeployState deployState, AbstractConfigProducer ancestor, Element producerSpec) { - return new TransactionLogServer(ancestor, clusterName, deployState.getProperties()); + return new TransactionLogServer(ancestor, clusterName); } } @@ -78,8 +74,7 @@ public class TransactionLogServer extends AbstractService { public void getConfig(TranslogserverConfig.Builder builder) { builder.listenport(getTlsPort()).basedir(getTlsDir()); - builder.usefsync(useFSync); - builder.compression.type(compressionType); + } } diff --git a/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/ContentBuilderTest.java b/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/ContentBuilderTest.java index 10049daa541..00b3fc22956 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/ContentBuilderTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/ContentBuilderTest.java @@ -803,9 +803,9 @@ public class ContentBuilderTest extends DomBuilderTest { } - private void verifyThatFeatureFlagControlsVisibilityDelayDefault(double defaultVisibiliDelay, Double xmlOverride, double expected) { + private void verifyThatFeatureFlagControlsVisibilityDelayDefault(Double xmlOverride, double expected) { String hostedXml = xmlWithVisibilityDelay(xmlOverride); - DeployState.Builder deployStateBuilder = new DeployState.Builder().properties(new TestProperties().setVisibilityDelay(defaultVisibiliDelay)); + DeployState.Builder deployStateBuilder = new DeployState.Builder().properties(new TestProperties()); VespaModel model = new VespaModelCreatorWithMockPkg(new MockApplicationPackage.Builder() .withServices(hostedXml) .withSearchDefinition(MockApplicationPackage.MUSIC_SEARCHDEFINITION) @@ -816,10 +816,9 @@ public class ContentBuilderTest extends DomBuilderTest { } @Test public void verifyThatFeatureFlagControlsVisibilityDelayDefault() { - verifyThatFeatureFlagControlsVisibilityDelayDefault(0.0, null, 0.0); - verifyThatFeatureFlagControlsVisibilityDelayDefault(0.3, null, 0.3); - verifyThatFeatureFlagControlsVisibilityDelayDefault(0.0, 0.5, 0.5); - verifyThatFeatureFlagControlsVisibilityDelayDefault(0.3, 0.6, 0.6); + verifyThatFeatureFlagControlsVisibilityDelayDefault(null, 0.0); + verifyThatFeatureFlagControlsVisibilityDelayDefault(0.5, 0.5); + verifyThatFeatureFlagControlsVisibilityDelayDefault(0.6, 0.6); } @Test diff --git a/config-model/src/test/java/com/yahoo/vespa/model/search/test/SearchNodeTest.java b/config-model/src/test/java/com/yahoo/vespa/model/search/test/SearchNodeTest.java index 5b44ece1755..e4dabfaddae 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/search/test/SearchNodeTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/search/test/SearchNodeTest.java @@ -40,7 +40,7 @@ public class SearchNodeTest { private void prepare(MockRoot root, SearchNode node) { Host host = new Host(root, "mockhost"); - TransactionLogServer tls = new TransactionLogServer(root, "mycluster", root.getDeployState().getProperties()); + TransactionLogServer tls = new TransactionLogServer(root, "mycluster"); tls.setHostResource(new HostResource(host)); tls.setBasePort(100); tls.initService(root.deployLogger()); @@ -101,21 +101,4 @@ public class SearchNodeTest { return tlsBuilder.build(); } - @Test - public void requireThaFeatureFlagCanControlTlsUseFSync() { - assertFalse(getTlsConfig(new TestProperties()).usefsync()); - assertFalse(getTlsConfig(new TestProperties().setTlsUseFSync(false)).usefsync()); - assertTrue(getTlsConfig(new TestProperties().setTlsUseFSync(true)).usefsync()); - } - - @Test - public void requireThaFeatureFlagCanControlCompressionType() { - assertEquals(TranslogserverConfig.Compression.Type.NONE, getTlsConfig(new TestProperties()).compression().type()); - assertEquals(TranslogserverConfig.Compression.Type.NONE, getTlsConfig(new TestProperties().setTlsCompressionType("NONE")).compression().type()); - assertEquals(TranslogserverConfig.Compression.Type.NONE_MULTI, getTlsConfig(new TestProperties().setTlsCompressionType("NONE_MULTI")).compression().type()); - assertEquals(TranslogserverConfig.Compression.Type.ZSTD, getTlsConfig(new TestProperties().setTlsCompressionType("ZSTD")).compression().type()); - assertEquals(TranslogserverConfig.Compression.Type.LZ4, getTlsConfig(new TestProperties().setTlsCompressionType("LZ4")).compression().type()); - assertEquals(TranslogserverConfig.Compression.Type.NONE, getTlsConfig(new TestProperties().setTlsCompressionType("zstd")).compression().type()); - } - } |