summaryrefslogtreecommitdiffstats
path: root/config-model/src/test/java/com/yahoo
diff options
context:
space:
mode:
authorGeir Storli <geirst@yahooinc.com>2022-01-12 14:46:54 +0000
committerGeir Storli <geirst@yahooinc.com>2022-01-12 14:46:54 +0000
commit3578ae64641d6a3fb412d6ca1516e3cec0ac70e3 (patch)
treec3dcce192475a4cbafa35ec283926ed678ffc1ac /config-model/src/test/java/com/yahoo
parent6a23f39b0232c71ad5e687843347c90418771a71 (diff)
Set defaults in config defs and ModelContext api to improve bucket merge performance on content nodes.
These are the same defaults set for the feature flags in https://github.com/vespa-engine/vespa/pull/20759.
Diffstat (limited to 'config-model/src/test/java/com/yahoo')
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/ContentBuilderTest.java2
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/content/ContentClusterTest.java24
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/content/StorageClusterTest.java10
3 files changed, 18 insertions, 18 deletions
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 a27b6786800..c746db168ee 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
@@ -825,7 +825,7 @@ public class ContentBuilderTest extends DomBuilderTest {
@Test
public void feed_master_task_limit_is_controlled_by_feature_flag() {
- assertEquals(0, resolveFeedMasterTaskLimitConfigWithFeatureFlag(null));
+ assertEquals(1000, resolveFeedMasterTaskLimitConfigWithFeatureFlag(null));
assertEquals(2000, resolveFeedMasterTaskLimitConfigWithFeatureFlag(2000));
}
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 4295f0aa6ec..4591726d1f9 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
@@ -1127,8 +1127,8 @@ public class ContentClusterTest extends ContentBaseTest {
@Test
public void distributor_merge_busy_wait_controlled_by_properties() throws Exception {
- assertEquals(10, resolveDistributorMergeBusyWaitConfig(Optional.empty()));
- assertEquals(1, resolveDistributorMergeBusyWaitConfig(Optional.of(1)));
+ assertEquals(1, resolveDistributorMergeBusyWaitConfig(Optional.empty()));
+ assertEquals(5, resolveDistributorMergeBusyWaitConfig(Optional.of(5)));
}
private int resolveDistributorMergeBusyWaitConfig(Optional<Integer> mergeBusyWait) throws Exception {
@@ -1144,14 +1144,14 @@ public class ContentClusterTest extends ContentBaseTest {
@Test
public void distributor_enhanced_maintenance_scheduling_controlled_by_properties() throws Exception {
- assertFalse(resolveDistributorEnhancedSchedulingConfig(false));
- assertTrue(resolveDistributorEnhancedSchedulingConfig(true));
+ assertFalse(resolveDistributorEnhancedSchedulingConfig(Optional.of(false)));
+ assertTrue(resolveDistributorEnhancedSchedulingConfig(Optional.empty()));
}
- private boolean resolveDistributorEnhancedSchedulingConfig(boolean enhancedScheduling) throws Exception {
+ private boolean resolveDistributorEnhancedSchedulingConfig(Optional<Boolean> enhancedScheduling) throws Exception {
var props = new TestProperties();
- if (enhancedScheduling) {
- props.distributorEnhancedMaintenanceScheduling(enhancedScheduling);
+ if (enhancedScheduling.isPresent()) {
+ props.distributorEnhancedMaintenanceScheduling(enhancedScheduling.get());
}
var cluster = createOneNodeCluster(props);
var builder = new StorDistributormanagerConfig.Builder();
@@ -1161,14 +1161,14 @@ public class ContentClusterTest extends ContentBaseTest {
@Test
public void unordered_merge_chaining_config_controlled_by_properties() throws Exception {
- assertFalse(resolveUnorderedMergeChainingConfig(false));
- assertTrue(resolveUnorderedMergeChainingConfig(true));
+ assertFalse(resolveUnorderedMergeChainingConfig(Optional.of(false)));
+ assertTrue(resolveUnorderedMergeChainingConfig(Optional.empty()));
}
- private boolean resolveUnorderedMergeChainingConfig(boolean unorderedMergeChaining) throws Exception {
+ private boolean resolveUnorderedMergeChainingConfig(Optional<Boolean> unorderedMergeChaining) throws Exception {
var props = new TestProperties();
- if (unorderedMergeChaining) {
- props.setUnorderedMergeChaining(true);
+ if (unorderedMergeChaining.isPresent()) {
+ props.setUnorderedMergeChaining(unorderedMergeChaining.get());
}
var cluster = createOneNodeCluster(props);
var builder = new StorDistributormanagerConfig.Builder();
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/StorageClusterTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/StorageClusterTest.java
index 739f8b7fff2..c521d24d22f 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/content/StorageClusterTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/content/StorageClusterTest.java
@@ -117,8 +117,8 @@ public class StorageClusterTest {
StorServerConfig config = new StorServerConfig(builder);
assertEquals(16, config.max_merges_per_node());
- assertEquals(1024, config.max_merge_queue_size());
- assertFalse(config.disable_queue_limits_for_chained_merges());
+ assertEquals(100, config.max_merge_queue_size());
+ assertTrue(config.disable_queue_limits_for_chained_merges());
}
@Test
@@ -171,10 +171,10 @@ public class StorageClusterTest {
@Test
public void async_apply_bucket_diff_can_be_controlled_by_feature_flag() {
var config = filestorConfigFromProperties(new TestProperties());
- assertFalse(config.async_apply_bucket_diff());
-
- config = filestorConfigFromProperties(new TestProperties().setAsyncApplyBucketDiff(true));
assertTrue(config.async_apply_bucket_diff());
+
+ config = filestorConfigFromProperties(new TestProperties().setAsyncApplyBucketDiff(false));
+ assertFalse(config.async_apply_bucket_diff());
}
@Test