diff options
Diffstat (limited to 'searchcore')
4 files changed, 40 insertions, 38 deletions
diff --git a/searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp b/searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp index 855b31310a3..aff368ceced 100644 --- a/searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp +++ b/searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp @@ -197,16 +197,16 @@ void Test::requireThatMemoryIndexCanBeDumpedAndSearched() { bool fret1 = DocumentSummary::readDocIdLimit(index_dir, fusionDocIdLimit); ASSERT_TRUE(fret1); SelectorArray selector(fusionDocIdLimit, 0); - bool fret2 = Fusion::merge(schema, - index_dir2, - fusionInputs, - selector, - false /* dynamicKPosOccFormat */, - tuneFileIndexing, - fileHeaderContext, - sharedExecutor, - std::make_shared<FlushToken>()); - ASSERT_TRUE(fret2); + { + Fusion fusion(schema, + index_dir2, + fusionInputs, + selector, + tuneFileIndexing, + fileHeaderContext); + bool fret2 = fusion.merge(sharedExecutor, std::make_shared<FlushToken>()); + ASSERT_TRUE(fret2); + } // Fusion test with all docs removed in output (doesn't affect word list) const string index_dir3 = "test_index3"; @@ -216,16 +216,16 @@ void Test::requireThatMemoryIndexCanBeDumpedAndSearched() { bool fret3 = DocumentSummary::readDocIdLimit(index_dir, fusionDocIdLimit); ASSERT_TRUE(fret3); SelectorArray selector2(fusionDocIdLimit, 1); - bool fret4 = Fusion::merge(schema, - index_dir3, - fusionInputs, - selector2, - false /* dynamicKPosOccFormat */, - tuneFileIndexing, - fileHeaderContext, - sharedExecutor, - std::make_shared<FlushToken>()); - ASSERT_TRUE(fret4); + { + Fusion fusion(schema, + index_dir3, + fusionInputs, + selector2, + tuneFileIndexing, + fileHeaderContext); + bool fret4 = fusion.merge(sharedExecutor, std::make_shared<FlushToken>()); + ASSERT_TRUE(fret4); + } // Fusion test with all docs removed in input (affects word list) const string index_dir4 = "test_index4"; @@ -235,16 +235,17 @@ void Test::requireThatMemoryIndexCanBeDumpedAndSearched() { bool fret5 = DocumentSummary::readDocIdLimit(index_dir3, fusionDocIdLimit); ASSERT_TRUE(fret5); SelectorArray selector3(fusionDocIdLimit, 0); - bool fret6 = Fusion::merge(schema, - index_dir4, - fusionInputs, - selector3, - false /* dynamicKPosOccFormat */, - tuneFileIndexing, - fileHeaderContext, - sharedExecutor, - std::make_shared<FlushToken>()); - ASSERT_TRUE(fret6); + { + Fusion fusion(schema, + index_dir4, + fusionInputs, + selector3, + tuneFileIndexing, + fileHeaderContext); + bool fret6 = fusion.merge(sharedExecutor, + std::make_shared<FlushToken>()); + ASSERT_TRUE(fret6); + } DiskIndex disk_index(index_dir); ASSERT_TRUE(disk_index.setup(TuneFileSearch())); diff --git a/searchcore/src/tests/proton/server/memory_flush_config_updater/memory_flush_config_updater_test.cpp b/searchcore/src/tests/proton/server/memory_flush_config_updater/memory_flush_config_updater_test.cpp index 01b46dd365f..7ff59a9f41a 100644 --- a/searchcore/src/tests/proton/server/memory_flush_config_updater/memory_flush_config_updater_test.cpp +++ b/searchcore/src/tests/proton/server/memory_flush_config_updater/memory_flush_config_updater_test.cpp @@ -205,12 +205,13 @@ TEST_F("require that we must go below low watermark for memory usage before usin TEST_F("require that more disk bloat is allowed while node state is retired", Fixture) { + constexpr double DEFAULT_DISK_BLOAT = 0.25; f.notifyDiskMemUsage(ResourceUsageState(0.7, 0.3), belowLimit()); - TEST_DO(f.assertStrategyDiskConfig(0.2, 0.2)); + TEST_DO(f.assertStrategyDiskConfig(DEFAULT_DISK_BLOAT, DEFAULT_DISK_BLOAT)); f.setNodeRetired(true); - TEST_DO(f.assertStrategyDiskConfig((0.8 - ((0.3/0.7)*(1 - 0.2))) / 0.8, 1.0)); + TEST_DO(f.assertStrategyDiskConfig((0.8 - ((0.3/0.7)*(1 - DEFAULT_DISK_BLOAT))) / 0.8, 1.0)); f.notifyDiskMemUsage(belowLimit(), belowLimit()); - TEST_DO(f.assertStrategyDiskConfig(0.2, 0.2)); + TEST_DO(f.assertStrategyDiskConfig(DEFAULT_DISK_BLOAT, DEFAULT_DISK_BLOAT)); } TEST_MAIN() { TEST_RUN_ALL(); } diff --git a/searchcore/src/vespa/searchcore/config/proton.def b/searchcore/src/vespa/searchcore/config/proton.def index 7e99c1a19aa..8a3550ac00b 100644 --- a/searchcore/src/vespa/searchcore/config/proton.def +++ b/searchcore/src/vespa/searchcore/config/proton.def @@ -54,7 +54,7 @@ flush.strategy enum {SIMPLE, MEMORY} default=MEMORY restart flush.memory.maxmemory long default=4294967296 ## Maximum total disk bloat factor before forcing flush. -flush.memory.diskbloatfactor double default=0.2 +flush.memory.diskbloatfactor double default=0.25 ## Max disk usage (in bytes) for all transaction logs before running flush. ## In this case the oldest component is flushed such that transaction log can be pruned and disk freed. @@ -65,7 +65,7 @@ flush.memory.maxtlssize long default=21474836480 flush.memory.each.maxmemory long default=1073741824 ## Maximum disk bloat factor per component before forcing flush. -flush.memory.each.diskbloatfactor double default=0.2 +flush.memory.each.diskbloatfactor double default=0.25 ## Age of unflushed content before forcing age prioritization. ## Unit is seconds with 31 hours being the default. diff --git a/searchcore/src/vespa/searchcore/proton/index/indexmanager.cpp b/searchcore/src/vespa/searchcore/proton/index/indexmanager.cpp index bfca455217c..251d0475537 100644 --- a/searchcore/src/vespa/searchcore/proton/index/indexmanager.cpp +++ b/searchcore/src/vespa/searchcore/proton/index/indexmanager.cpp @@ -69,9 +69,9 @@ IndexManager::MaintainerOperations::runFusion(const Schema &schema, std::shared_ptr<IFlushToken> flush_token) { SerialNumFileHeaderContext fileHeaderContext(_fileHeaderContext, serialNum); - const bool dynamic_k_doc_pos_occ_format = false; - return Fusion::merge(schema, outputDir, sources, selectorArray, dynamic_k_doc_pos_occ_format, - _tuneFileIndexing, fileHeaderContext, _threadingService.shared(), std::move(flush_token)); + Fusion fusion(schema, outputDir, sources, selectorArray, + _tuneFileIndexing, fileHeaderContext); + return fusion.merge(_threadingService.shared(), std::move(flush_token)); } |