diff options
author | Tor Egge <Tor.Egge@broadpark.no> | 2018-09-17 14:50:42 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@broadpark.no> | 2018-09-17 14:57:36 +0200 |
commit | 41541231f5f02e5298181b245a1b4da916ba37b2 (patch) | |
tree | f206af379c3abc6a9fcd5cfec9bdddc3ede16ece /searchlib | |
parent | 2e24a9228f20922cd0ea9d4a82f4d20934c25db2 (diff) |
Stop using search.io setting from proton.def.
Files for indexed fields (posting lists and dictionaries) are now always memory mapped.
Diffstat (limited to 'searchlib')
-rw-r--r-- | searchlib/src/vespa/searchlib/common/tunefileinfo.h | 5 | ||||
-rw-r--r-- | searchlib/src/vespa/searchlib/common/tunefileinfo.hpp | 7 |
2 files changed, 10 insertions, 2 deletions
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; |