diff options
Diffstat (limited to 'searchcommon')
-rw-r--r-- | searchcommon/src/vespa/searchcommon/attribute/config.cpp | 29 | ||||
-rw-r--r-- | searchcommon/src/vespa/searchcommon/attribute/config.h | 4 |
2 files changed, 14 insertions, 19 deletions
diff --git a/searchcommon/src/vespa/searchcommon/attribute/config.cpp b/searchcommon/src/vespa/searchcommon/attribute/config.cpp index aae565ff775..0a50faa04c0 100644 --- a/searchcommon/src/vespa/searchcommon/attribute/config.cpp +++ b/searchcommon/src/vespa/searchcommon/attribute/config.cpp @@ -4,25 +4,14 @@ namespace search::attribute { -Config::Config() noexcept : - _basicType(BasicType::NONE), - _type(CollectionType::SINGLE), - _fastSearch(false), - _huge(false), - _enableBitVectors(false), - _enableOnlyBitVector(false), - _isFilter(false), - _fastAccess(false), - _mutable(false), - _paged(false), - _match(Match::UNCASED), - _dictionary(), - _growStrategy(), - _compactionStrategy(), - _predicateParams(), - _tensorType(vespalib::eval::ValueType::error_type()), - _distance_metric(DistanceMetric::Euclidean), - _hnsw_index_params() +namespace { + +static constexpr uint64_t MAX_UNCOMMITTED_MEMORY = 8000; + +} + +Config::Config() noexcept + : Config(BasicType::NONE, CollectionType::SINGLE, false, false) { } @@ -37,6 +26,7 @@ Config::Config(BasicType bt, CollectionType ct, bool fastSearch_, bool huge_) no _fastAccess(false), _mutable(false), _paged(false), + _maxUnCommittedMemory(MAX_UNCOMMITTED_MEMORY), _match(Match::UNCASED), _dictionary(), _growStrategy(), @@ -67,6 +57,7 @@ Config::operator==(const Config &b) const _fastAccess == b._fastAccess && _mutable == b._mutable && _paged == b._paged && + _maxUnCommittedMemory == b._maxUnCommittedMemory && _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 9734124ff69..e6a428e5843 100644 --- a/searchcommon/src/vespa/searchcommon/attribute/config.h +++ b/searchcommon/src/vespa/searchcommon/attribute/config.h @@ -129,6 +129,9 @@ public: bool operator!=(const Config &b) const { return !(operator==(b)); } bool operator==(const Config &b) const; + uint64_t getMaxUnCommittedMemory() const { return _maxUnCommittedMemory; } + Config & setMaxUnCommittedMemory(uint64_t value) { _maxUnCommittedMemory = value; return *this; } + private: BasicType _basicType; CollectionType _type; @@ -140,6 +143,7 @@ private: bool _fastAccess; bool _mutable; bool _paged; + uint64_t _maxUnCommittedMemory; Match _match; DictionaryConfig _dictionary; GrowStrategy _growStrategy; |