diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-08-12 13:41:15 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2021-08-12 13:41:15 +0000 |
commit | 3efc9cfdde773167f3a8385dc7ccf9b7235d3acb (patch) | |
tree | 0a0cae7eb7c0053d83ed5c5bbc0edd0200a3d0ab | |
parent | 76a6060a8d840f4babc6ad613b6dd9d13f6d9e8d (diff) |
swappable -> paged
6 files changed, 13 insertions, 13 deletions
diff --git a/searchcommon/src/vespa/searchcommon/attribute/config.cpp b/searchcommon/src/vespa/searchcommon/attribute/config.cpp index 905a446407d..ee5e4a6a905 100644 --- a/searchcommon/src/vespa/searchcommon/attribute/config.cpp +++ b/searchcommon/src/vespa/searchcommon/attribute/config.cpp @@ -14,7 +14,7 @@ Config::Config() noexcept : _isFilter(false), _fastAccess(false), _mutable(false), - _swappable(false), + _paged(false), _match(Match::UNCASED), _dictionary(), _growStrategy(), @@ -36,7 +36,7 @@ Config::Config(BasicType bt, CollectionType ct, bool fastSearch_, bool huge_) no _isFilter(false), _fastAccess(false), _mutable(false), - _swappable(false), + _paged(false), _match(Match::UNCASED), _dictionary(), _growStrategy(), @@ -66,7 +66,7 @@ Config::operator==(const Config &b) const _isFilter == b._isFilter && _fastAccess == b._fastAccess && _mutable == b._mutable && - _swappable == b._swappable && + _paged == b._paged && _match == b._match && _dictionary == b._dictionary && _growStrategy == b._growStrategy && diff --git a/searchcommon/src/vespa/searchcommon/attribute/config.h b/searchcommon/src/vespa/searchcommon/attribute/config.h index bb278951b8e..97038ea9653 100644 --- a/searchcommon/src/vespa/searchcommon/attribute/config.h +++ b/searchcommon/src/vespa/searchcommon/attribute/config.h @@ -40,7 +40,7 @@ public: CollectionType collectionType() const { return _type; } bool fastSearch() const { return _fastSearch; } bool huge() const { return _huge; } - bool swappable() const { return _swappable; } + bool paged() const { return _paged; } const PredicateParams &predicateParams() const { return _predicateParams; } const vespalib::eval::ValueType & tensorType() const { return _tensorType; } DistanceMetric distance_metric() const { return _distance_metric; } @@ -117,7 +117,7 @@ public: */ Config & setIsFilter(bool isFilter) { _isFilter = isFilter; return *this; } Config & setMutable(bool isMutable) { _mutable = isMutable; return *this; } - Config & setSwappable(bool isSwappable) { _swappable = isSwappable; return *this; } + Config & setPaged(bool paged_in) { _paged = paged_in; return *this; } Config & setFastAccess(bool v) { _fastAccess = v; return *this; } Config & setGrowStrategy(const GrowStrategy &gs) { _growStrategy = gs; return *this; } Config & setCompactionStrategy(const CompactionStrategy &compactionStrategy) { @@ -139,7 +139,7 @@ private: bool _isFilter; bool _fastAccess; bool _mutable; - bool _swappable; + bool _paged; Match _match; DictionaryConfig _dictionary; GrowStrategy _growStrategy; diff --git a/searchlib/src/tests/attribute/attributemanager/attributemanager_test.cpp b/searchlib/src/tests/attribute/attributemanager/attributemanager_test.cpp index c6e6ac2f8ba..877b5b9e427 100644 --- a/searchlib/src/tests/attribute/attributemanager/attributemanager_test.cpp +++ b/searchlib/src/tests/attribute/attributemanager/attributemanager_test.cpp @@ -238,9 +238,9 @@ TEST("require that config can be converted") } { CACA a; - EXPECT_TRUE(!CC::convert(a).swappable()); - a.swappable = true; - EXPECT_TRUE(CC::convert(a).swappable()); + EXPECT_TRUE(!CC::convert(a).paged()); + a.paged = true; + EXPECT_TRUE(CC::convert(a).paged()); } { // tensor CACA a; diff --git a/searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp b/searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp index 56233722f69..605fcb538d6 100644 --- a/searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp +++ b/searchlib/src/tests/attribute/tensorattribute/tensorattribute_test.cpp @@ -335,7 +335,7 @@ struct Fixture { _denseTensors = true; } if (_traits.use_mmap_file_allocator) { - _cfg.setSwappable(true); + _cfg.setPaged(true); } if (_traits.use_mock_index) { _index_factory = std::make_unique<MockNearestNeighborIndexFactory>(); @@ -1010,7 +1010,7 @@ TEST_F("NN blueprint handles strong filter triggering brute force search", Neare EXPECT_FALSE(bp->may_approximate()); } -TEST("Dense tensor attribute with swappable flag uses mmap file allocator") +TEST("Dense tensor attribute with paged flag uses mmap file allocator") { vespalib::string basedir("mmap-file-allocator-factory-dir"); vespalib::alloc::MmapFileAllocatorFactory::instance().setup(basedir); diff --git a/searchlib/src/vespa/searchlib/attribute/configconverter.cpp b/searchlib/src/vespa/searchlib/attribute/configconverter.cpp index d4b37dc5c9d..625502ee32b 100644 --- a/searchlib/src/vespa/searchlib/attribute/configconverter.cpp +++ b/searchlib/src/vespa/searchlib/attribute/configconverter.cpp @@ -108,7 +108,7 @@ ConfigConverter::convert(const AttributesConfig::Attribute & cfg) retval.setIsFilter(cfg.enableonlybitvector); retval.setFastAccess(cfg.fastaccess); retval.setMutable(cfg.ismutable); - retval.setSwappable(cfg.swappable); + retval.setPaged(cfg.paged); predicateParams.setArity(cfg.arity); predicateParams.setBounds(cfg.lowerbound, cfg.upperbound); predicateParams.setDensePostingListThreshold(cfg.densepostinglistthreshold); diff --git a/searchlib/src/vespa/searchlib/tensor/dense_tensor_attribute.cpp b/searchlib/src/vespa/searchlib/tensor/dense_tensor_attribute.cpp index 8cc4acefd0f..d0943b372be 100644 --- a/searchlib/src/vespa/searchlib/tensor/dense_tensor_attribute.cpp +++ b/searchlib/src/vespa/searchlib/tensor/dense_tensor_attribute.cpp @@ -125,7 +125,7 @@ DenseTensorAttribute::memory_usage() const DenseTensorAttribute::DenseTensorAttribute(vespalib::stringref baseFileName, const Config& cfg, const NearestNeighborIndexFactory& index_factory) : TensorAttribute(baseFileName, cfg, _denseTensorStore), - _denseTensorStore(cfg.tensorType(), make_memory_allocator(getName(), cfg.swappable())), + _denseTensorStore(cfg.tensorType(), make_memory_allocator(getName(), cfg.paged())), _index() { if (cfg.hnsw_index_params().has_value()) { |