diff options
author | Geir Storli <geirstorli@yahoo.no> | 2018-09-17 15:58:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-17 15:58:52 +0200 |
commit | 00241141adfa8a9ef6a75fc9d82887dbf00468fd (patch) | |
tree | 92244745b5301128ca5dfdb4a8c7e60373b9eef4 | |
parent | dc82c92d0899d036a1023e9e836278c52e00b5bd (diff) | |
parent | 41541231f5f02e5298181b245a1b4da916ba37b2 (diff) |
Merge pull request #6979 from vespa-engine/toregge/stop-using-proton-search-io-setting
Stop using search.io setting from proton.def
4 files changed, 12 insertions, 7 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/bootstrapconfigmanager.cpp b/searchcore/src/vespa/searchcore/proton/server/bootstrapconfigmanager.cpp index 0c2870ad35d..edbf0c631a5 100644 --- a/searchcore/src/vespa/searchcore/proton/server/bootstrapconfigmanager.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/bootstrapconfigmanager.cpp @@ -84,7 +84,8 @@ BootstrapConfigManager::update(const ConfigSnapshot & snapshot) tune._index._indexing._write.setFromConfig<ProtonConfig::Indexing::Write>(conf.indexing.write.io); tune._index._indexing._read.setFromConfig<ProtonConfig::Indexing::Read>(conf.indexing.read.io); tune._attr._write.setFromConfig<ProtonConfig::Attribute::Write>(conf.attribute.write.io); - tune._index._search._read.setFromConfig<ProtonConfig::Search, ProtonConfig::Search::Mmap>(conf.search.io, conf.search.mmap); + tune._index._search._read.setWantMemoryMap(); + tune._index._search._read.setFromMmapConfig<ProtonConfig::Search::Mmap>(conf.search.mmap); tune._summary._write.setFromConfig<ProtonConfig::Summary::Write>(conf.summary.write.io); tune._summary._seqRead.setFromConfig<ProtonConfig::Summary::Read>(conf.summary.read.io); tune._summary._randRead.setFromConfig<ProtonConfig::Summary::Read, ProtonConfig::Summary::Read::Mmap>(conf.summary.read.io, conf.summary.read.mmap); diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.cpp b/searchcore/src/vespa/searchcore/proton/server/proton.cpp index ab0abde6ccd..070a3172fe0 100644 --- a/searchcore/src/vespa/searchcore/proton/server/proton.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/proton.cpp @@ -14,7 +14,6 @@ #include "searchhandlerproxy.h" #include "simpleflush.h" -#include <vespa/searchcommon/common/schemaconfigurer.h> #include <vespa/searchcore/proton/flushengine/flushengine.h> #include <vespa/searchcore/proton/flushengine/flush_engine_explorer.h> #include <vespa/searchcore/proton/flushengine/prepare_restart_flush_strategy.h> @@ -48,9 +47,6 @@ using vespalib::Slime; using vespalib::slime::ArrayInserter; using vespalib::slime::Cursor; -using search::TuneFileDocumentDB; -using search::index::Schema; -using search::index::SchemaBuilder; using search::transactionlog::DomainStats; using vespa::config::search::core::ProtonConfig; using vespa::config::search::core::internal::InternalProtonType; diff --git a/searchlib/src/vespa/searchlib/common/tunefileinfo.h b/searchlib/src/vespa/searchlib/common/tunefileinfo.h index 223dcdbc7f1..edd6d29dd58 100644 --- a/searchlib/src/vespa/searchlib/common/tunefileinfo.h +++ b/searchlib/src/vespa/searchlib/common/tunefileinfo.h @@ -119,8 +119,9 @@ public: int getAdvise() const { return _advise; } template <typename TuneControlConfig, typename MMapConfig> - void - setFromConfig(const enum TuneControlConfig::Io & tuneControlConfig, const MMapConfig & mmapFlags); + void setFromConfig(const enum TuneControlConfig::Io & tuneControlConfig, const MMapConfig & mmapFlags); + template <typename MMapConfig> + void setFromMmapConfig(const MMapConfig & mmapFlags); bool operator==(const TuneFileRandRead &rhs) const { return (_tuneControl == rhs._tuneControl) && (_mmapFlags == rhs._mmapFlags); diff --git a/searchlib/src/vespa/searchlib/common/tunefileinfo.hpp b/searchlib/src/vespa/searchlib/common/tunefileinfo.hpp index 22d89d904d2..08acd2caa97 100644 --- a/searchlib/src/vespa/searchlib/common/tunefileinfo.hpp +++ b/searchlib/src/vespa/searchlib/common/tunefileinfo.hpp @@ -1,3 +1,4 @@ + // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once @@ -17,6 +18,12 @@ TuneFileRandRead::setFromConfig(const enum TuneControlConfig::Io & tuneControlCo case TuneControlConfig::MMAP: _tuneControl = MMAP; break; default: _tuneControl = NORMAL; break; } + setFromMmapConfig(mmapFlags); +} + +template <typename MMapConfig> +void +TuneFileRandRead::setFromMmapConfig(const MMapConfig & mmapFlags) { for (size_t i(0), m(mmapFlags.options.size()); i < m; i++) { switch (mmapFlags.options[i]) { case MMapConfig::MLOCK: _mmapFlags |= MAP_LOCKED; break; |