summaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-09-30 11:18:21 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2022-09-30 11:18:33 +0200
commitd4676c26c8dd26c05a72257fa4c9e8b69b0c0ab0 (patch)
treea970e31012593b831f9ad084099787d8164f19a4 /config-model
parente22ff8637d9f86cd56d9e9ff410b7d4b87bfe637 (diff)
Always doing three phase updates now.
Diffstat (limited to 'config-model')
-rw-r--r--config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java7
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/content/DistributorCluster.java22
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/content/ContentClusterTest.java16
3 files changed, 4 insertions, 41 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 e37959054c5..39d1a76341e 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
@@ -38,7 +38,6 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea
private Zone zone;
private final Set<ContainerEndpoint> endpoints = Collections.emptySet();
private boolean useDedicatedNodeForLogserver = false;
- private boolean useThreePhaseUpdates = false;
private double defaultTermwiseLimit = 1.0;
private String jvmGCOptions = null;
private String queryDispatchPolicy = "adaptive";
@@ -107,7 +106,6 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea
@Override public boolean useDedicatedNodeForLogserver() { return useDedicatedNodeForLogserver; }
@Override public Optional<EndpointCertificateSecrets> endpointCertificateSecrets() { return endpointCertificateSecrets; }
@Override public double defaultTermwiseLimit() { return defaultTermwiseLimit; }
- @Override public boolean useThreePhaseUpdates() { return useThreePhaseUpdates; }
@Override public Optional<AthenzDomain> athenzDomain() { return Optional.ofNullable(athenzDomain); }
@Override public String responseSequencerType() { return responseSequencerType; }
@Override public int defaultNumResponseThreads() { return responseNumThreads; }
@@ -236,11 +234,6 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea
return this;
}
- public TestProperties setUseThreePhaseUpdates(boolean useThreePhaseUpdates) {
- this.useThreePhaseUpdates = useThreePhaseUpdates;
- return this;
- }
-
public TestProperties setApplicationId(ApplicationId applicationId) {
this.applicationId = applicationId;
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 b8e27d92f8c..b1258247e2e 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
@@ -25,22 +25,12 @@ public class DistributorCluster extends AbstractConfigProducer<Distributor> impl
public static final Logger log = Logger.getLogger(DistributorCluster.class.getPackage().toString());
- private static class GcOptions {
-
- public final int interval;
- public final String selection;
-
- public GcOptions(int interval, String selection) {
- this.interval = interval;
- this.selection = selection;
- }
- }
+ private record GcOptions(int interval, String selection) { }
private final ContentCluster parent;
private final BucketSplitting bucketSplitting;
private final GcOptions gc;
private final boolean hasIndexedDocumentType;
- private final boolean useThreePhaseUpdates;
private final int maxActivationInhibitedOutOfSyncGroups;
private final boolean unorderedMergeChaining;
private final boolean useTwoPhaseDocumentGc;
@@ -99,26 +89,24 @@ public class DistributorCluster extends AbstractConfigProducer<Distributor> impl
}
@Override
- protected DistributorCluster doBuild(DeployState deployState, AbstractConfigProducer ancestor, Element producerSpec) {
+ protected DistributorCluster doBuild(DeployState deployState, AbstractConfigProducer<?> ancestor, Element producerSpec) {
final ModelElement clusterElement = new ModelElement(producerSpec);
final ModelElement documentsNode = clusterElement.child("documents");
final GcOptions gc = parseGcOptions(documentsNode);
final boolean hasIndexedDocumentType = clusterContainsIndexedDocumentType(documentsNode);
- boolean useThreePhaseUpdates = deployState.getProperties().featureFlags().useThreePhaseUpdates();
int maxInhibitedGroups = deployState.getProperties().featureFlags().maxActivationInhibitedOutOfSyncGroups();
boolean unorderedMergeChaining = deployState.getProperties().featureFlags().unorderedMergeChaining();
boolean useTwoPhaseDocumentGc = deployState.getProperties().featureFlags().useTwoPhaseDocumentGc();
return new DistributorCluster(parent,
new BucketSplitting.Builder().build(new ModelElement(producerSpec)), gc,
- hasIndexedDocumentType, useThreePhaseUpdates,
+ hasIndexedDocumentType,
maxInhibitedGroups, unorderedMergeChaining, useTwoPhaseDocumentGc);
}
}
private DistributorCluster(ContentCluster parent, BucketSplitting bucketSplitting,
GcOptions gc, boolean hasIndexedDocumentType,
- boolean useThreePhaseUpdates,
int maxActivationInhibitedOutOfSyncGroups,
boolean unorderedMergeChaining,
boolean useTwoPhaseDocumentGc)
@@ -128,7 +116,6 @@ public class DistributorCluster extends AbstractConfigProducer<Distributor> impl
this.bucketSplitting = bucketSplitting;
this.gc = gc;
this.hasIndexedDocumentType = hasIndexedDocumentType;
- this.useThreePhaseUpdates = useThreePhaseUpdates;
this.maxActivationInhibitedOutOfSyncGroups = maxActivationInhibitedOutOfSyncGroups;
this.unorderedMergeChaining = unorderedMergeChaining;
this.useTwoPhaseDocumentGc = useTwoPhaseDocumentGc;
@@ -142,8 +129,7 @@ public class DistributorCluster extends AbstractConfigProducer<Distributor> impl
.interval(gc.interval));
}
builder.enable_revert(parent.getPersistence().supportRevert());
- builder.disable_bucket_activation(hasIndexedDocumentType == false);
- builder.enable_metadata_only_fetch_phase_for_inconsistent_updates(useThreePhaseUpdates);
+ builder.disable_bucket_activation(!hasIndexedDocumentType);
builder.max_activation_inhibited_out_of_sync_groups(maxActivationInhibitedOutOfSyncGroups);
builder.use_unordered_merge_chaining(unorderedMergeChaining);
builder.enable_two_phase_garbage_collection(useTwoPhaseDocumentGc);
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 ac291fc578f..0ba47d9c58b 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
@@ -1036,22 +1036,6 @@ public class ContentClusterTest extends ContentBaseTest {
}
}
- private boolean resolveThreePhaseUpdateConfigWithFeatureFlag(boolean flagEnableThreePhase) {
- VespaModel model = createEnd2EndOneNode(new TestProperties().setUseThreePhaseUpdates(flagEnableThreePhase));
-
- ContentCluster cc = model.getContentClusters().get("storage");
- var builder = new StorDistributormanagerConfig.Builder();
- cc.getDistributorNodes().getConfig(builder);
-
- return (new StorDistributormanagerConfig(builder)).enable_metadata_only_fetch_phase_for_inconsistent_updates();
- }
-
- @Test
- void default_distributor_three_phase_update_config_controlled_by_properties() {
- assertFalse(resolveThreePhaseUpdateConfigWithFeatureFlag(false));
- assertTrue(resolveThreePhaseUpdateConfigWithFeatureFlag(true));
- }
-
private int resolveMaxCompactBuffers(OptionalInt maxCompactBuffers) {
TestProperties testProperties = new TestProperties();
if (maxCompactBuffers.isPresent()) {