diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-01-12 16:23:21 +0100 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2023-01-12 16:23:21 +0100 |
commit | dfeaf3de46e24296221f04548a990b128be26d6a (patch) | |
tree | e444761b1c7349465609831b2b4c486a344aa0f6 /config-model | |
parent | 02f969741ff5ba6009878291736924a61c096d66 (diff) |
GC unused use-two-phase-document-gc flag
Diffstat (limited to 'config-model')
3 files changed, 3 insertions, 42 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 25ca654fc63..7c0e3048328 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 @@ -70,7 +70,6 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea private List<String> environmentVariables = List.of(); private boolean loadCodeAsHugePages = false; private boolean sharedStringRepoNoReclaim = false; - private boolean useTwoPhaseDocumentGc = true; private int mbus_java_num_targets = 1; private int mbus_java_events_before_wakeup = 1; private int mbus_cpp_num_targets = 1; @@ -135,7 +134,6 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea @Override public int heapSizePercentage() { return heapSizePercentage; } @Override public int rpcEventsBeforeWakeup() { return rpc_events_before_wakeup; } @Override public String queryDispatchPolicy() { return queryDispatchPolicy; } - @Override public boolean useTwoPhaseDocumentGc() { return useTwoPhaseDocumentGc; } @Override public boolean useRestrictedDataPlaneBindings() { return useRestrictedDataPlaneBindings; } @Override public Optional<CloudAccount> cloudAccount() { return cloudAccount; } @Override public boolean allowUserFilters() { return allowUserFilters; } @@ -353,11 +351,6 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea return this; } - public TestProperties setUseTwoPhaseDocumentGc(boolean useTwoPhase) { - this.useTwoPhaseDocumentGc = useTwoPhase; - return this; - } - public TestProperties setUseRestrictedDataPlaneBindings(boolean useRestrictedDataPlaneBindings) { this.useRestrictedDataPlaneBindings = useRestrictedDataPlaneBindings; return this; 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 dae823bcc9f..6ca5ba3a8ca 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 @@ -32,8 +32,6 @@ public class DistributorCluster extends AbstractConfigProducer<Distributor> impl private final GcOptions gc; private final boolean hasIndexedDocumentType; private final int maxActivationInhibitedOutOfSyncGroups; - private final boolean useTwoPhaseDocumentGc; - public static class Builder extends VespaDomBuilder.DomConfigProducerBuilder<DistributorCluster> { ContentCluster parent; @@ -94,19 +92,17 @@ public class DistributorCluster extends AbstractConfigProducer<Distributor> impl final GcOptions gc = parseGcOptions(documentsNode); final boolean hasIndexedDocumentType = clusterContainsIndexedDocumentType(documentsNode); int maxInhibitedGroups = deployState.getProperties().featureFlags().maxActivationInhibitedOutOfSyncGroups(); - boolean useTwoPhaseDocumentGc = deployState.getProperties().featureFlags().useTwoPhaseDocumentGc(); return new DistributorCluster(parent, new BucketSplitting.Builder().build(new ModelElement(producerSpec)), gc, hasIndexedDocumentType, - maxInhibitedGroups, useTwoPhaseDocumentGc); + maxInhibitedGroups); } } private DistributorCluster(ContentCluster parent, BucketSplitting bucketSplitting, GcOptions gc, boolean hasIndexedDocumentType, - int maxActivationInhibitedOutOfSyncGroups, - boolean useTwoPhaseDocumentGc) + int maxActivationInhibitedOutOfSyncGroups) { super(parent, "distributor"); this.parent = parent; @@ -114,7 +110,6 @@ public class DistributorCluster extends AbstractConfigProducer<Distributor> impl this.gc = gc; this.hasIndexedDocumentType = hasIndexedDocumentType; this.maxActivationInhibitedOutOfSyncGroups = maxActivationInhibitedOutOfSyncGroups; - this.useTwoPhaseDocumentGc = useTwoPhaseDocumentGc; } @Override @@ -127,8 +122,6 @@ public class DistributorCluster extends AbstractConfigProducer<Distributor> impl builder.enable_revert(parent.getPersistence().supportRevert()); builder.disable_bucket_activation(!hasIndexedDocumentType); builder.max_activation_inhibited_out_of_sync_groups(maxActivationInhibitedOutOfSyncGroups); - builder.enable_two_phase_garbage_collection(useTwoPhaseDocumentGc); - bucketSplitting.getConfig(builder); } diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/ContentClusterTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/ContentClusterTest.java index 96f5f9b9409..88d3313f58e 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/content/ContentClusterTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/content/ContentClusterTest.java @@ -336,6 +336,7 @@ public class ContentClusterTest extends ContentBaseTest { model.getConfig(builder, "bar/distributor/0"); StorDistributormanagerConfig config = new StorDistributormanagerConfig(builder); assertFalse(config.inlinebucketsplitting()); + assertTrue(config.enable_two_phase_garbage_collection()); } { @@ -1132,32 +1133,6 @@ public class ContentClusterTest extends ContentBaseTest { assertEquals(4, resolveTunedNumDistributorStripesConfig(65)); } - private boolean resolveTwoPhaseGcConfigWithFeatureFlag(Boolean flagEnableTwoPhase) { - var props = new TestProperties(); - if (flagEnableTwoPhase != null) { - props.setUseTwoPhaseDocumentGc(flagEnableTwoPhase); - } - VespaModel model = createEnd2EndOneNode(props); - - ContentCluster cc = model.getContentClusters().get("storage"); - var builder = new StorDistributormanagerConfig.Builder(); - cc.getDistributorNodes().getConfig(builder); - - return (new StorDistributormanagerConfig(builder)).enable_two_phase_garbage_collection(); - } - - @Test - public void two_phase_garbage_collection_config_is_controlled_by_properties() { - assertFalse(resolveTwoPhaseGcConfigWithFeatureFlag(false)); - assertTrue(resolveTwoPhaseGcConfigWithFeatureFlag(true)); - } - - // TODO change once gradual rollout complete - @Test - public void two_phase_garbage_collection_config_is_enabled_by_default() { - assertTrue(resolveTwoPhaseGcConfigWithFeatureFlag(null)); - } - @Test void testDedicatedClusterControllers() { VespaModel noContentModel = createEnd2EndOneNode(new TestProperties().setHostedVespa(true) |