diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-11-08 23:20:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-08 23:20:32 +0100 |
commit | 434567d25d1ccecbabf193ce1692be718ca11ea0 (patch) | |
tree | 7d6faaf4e840d726bc0697da4b70cab33d6ac6b1 /searchlib | |
parent | 8e7d8d6750cf741ce94592f5b786b5cc68bce7b0 (diff) | |
parent | 7aa695db569e2821b50f1af373bc589c734ee1e7 (diff) |
Merge pull request #15221 from vespa-engine/balder/compute-updateability-once
- Move utility methods from proton::attribute to search::attribute.
Diffstat (limited to 'searchlib')
-rw-r--r-- | searchlib/src/vespa/searchlib/attribute/attributevector.cpp | 6 | ||||
-rw-r--r-- | searchlib/src/vespa/searchlib/attribute/attributevector.h | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/attributevector.cpp b/searchlib/src/vespa/searchlib/attribute/attributevector.cpp index dbd5690093b..2bcdbc8ecbf 100644 --- a/searchlib/src/vespa/searchlib/attribute/attributevector.cpp +++ b/searchlib/src/vespa/searchlib/attribute/attributevector.cpp @@ -16,12 +16,11 @@ #include <vespa/fastlib/io/bufferedfile.h> #include <vespa/searchlib/common/tunefileinfo.h> #include <vespa/searchlib/index/dummyfileheadercontext.h> -#include <vespa/searchlib/parsequery/stackdumpiterator.h> -#include <vespa/searchlib/query/query_term_simple.h> #include <vespa/searchlib/query/query_term_decoder.h> #include <vespa/searchlib/queryeval/emptysearch.h> #include <vespa/vespalib/util/exceptions.h> #include <vespa/searchlib/util/logutil.h> +#include <vespa/searchcommon/attribute/attribute_utils.h> #include <vespa/log/log.h> LOG_SETUP(".searchlib.attribute.attributevector"); @@ -129,7 +128,8 @@ AttributeVector::AttributeVector(vespalib::stringref baseFileName, const Config _createSerialNum(0u), _compactLidSpaceGeneration(0u), _hasEnum(false), - _loaded(false) + _loaded(false), + _isUpdateableInMemoryOnly(attribute::isUpdateableInMemoryOnly(getName(), getConfig())) { } diff --git a/searchlib/src/vespa/searchlib/attribute/attributevector.h b/searchlib/src/vespa/searchlib/attribute/attributevector.h index d8bdda911fd..4fc6589850e 100644 --- a/searchlib/src/vespa/searchlib/attribute/attributevector.h +++ b/searchlib/src/vespa/searchlib/attribute/attributevector.h @@ -397,6 +397,7 @@ public: CollectionType getInternalCollectionType() const { return _config.collectionType(); } const BaseName & getBaseFileName() const { return _baseFileName; } void setBaseFileName(vespalib::stringref name) { _baseFileName = name; } + bool isUpdateableInMemoryOnly() const { return _isUpdateableInMemoryOnly; } const vespalib::string & getName() const override final { return _baseFileName.getAttributeName(); } @@ -575,7 +576,7 @@ private: BaseName _baseFileName; Config _config; std::shared_ptr<attribute::Interlock> _interlock; - mutable std::shared_mutex _enumLock; + mutable std::shared_mutex _enumLock; GenerationHandler _genHandler; GenerationHolder _genHolder; Status _status; @@ -587,6 +588,7 @@ private: uint64_t _compactLidSpaceGeneration; bool _hasEnum; bool _loaded; + bool _isUpdateableInMemoryOnly; vespalib::steady_time _nextStatUpdateTime; ////// Locking strategy interface. only available from the Guards. |