diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-08-12 14:59:09 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2021-08-12 15:03:51 +0000 |
commit | 090f43f50f72964ab7ca408f0667e6d808b88111 (patch) | |
tree | 0f59691846bf4eeb2e71b198d3c736e73565993b /searchlib | |
parent | 07446ba73633a2cf392b844f5bb02aac032fb397 (diff) |
Add an executor to the AttributeVector::load/onLoad interface so attributes can use multithread load if feasible.
Diffstat (limited to 'searchlib')
32 files changed, 46 insertions, 39 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/attributevector.cpp b/searchlib/src/vespa/searchlib/attribute/attributevector.cpp index 79baa10a381..5de342bf380 100644 --- a/searchlib/src/vespa/searchlib/attribute/attributevector.cpp +++ b/searchlib/src/vespa/searchlib/attribute/attributevector.cpp @@ -362,11 +362,15 @@ AttributeVector::isEnumeratedSaveFormat() const return isEnumerated(datHeader); } - bool AttributeVector::load() { + return load(nullptr); +} + +bool +AttributeVector::load(vespalib::Executor * executor) { assert(!_loaded); - bool loaded = onLoad(); + bool loaded = onLoad(executor); if (loaded) { commit(); } @@ -374,7 +378,7 @@ AttributeVector::load() { return _loaded; } -bool AttributeVector::onLoad() { return false; } +bool AttributeVector::onLoad(vespalib::Executor *) { return false; } int32_t AttributeVector::getWeight(DocId, uint32_t) const { return 1; } bool AttributeVector::findEnum(const char *, EnumHandle &) const { return false; } diff --git a/searchlib/src/vespa/searchlib/attribute/attributevector.h b/searchlib/src/vespa/searchlib/attribute/attributevector.h index 99b0c923c90..b85e867a243 100644 --- a/searchlib/src/vespa/searchlib/attribute/attributevector.h +++ b/searchlib/src/vespa/searchlib/attribute/attributevector.h @@ -38,6 +38,7 @@ namespace document { namespace vespalib { class GenericHeader; + class Executor; } namespace search { @@ -447,6 +448,7 @@ public: bool isEnumeratedSaveFormat() const; bool load(); + bool load(vespalib::Executor * executor); void commit() { commit(false); } void commit(bool forceUpdateStats); void commit(const CommitParam & param); @@ -570,7 +572,7 @@ private: virtual bool applyWeight(DocId doc, const FieldValue &fv, const ArithmeticValueUpdate &wAdjust); virtual bool applyWeight(DocId doc, const FieldValue& fv, const document::AssignValueUpdate& wAdjust); virtual void onSave(IAttributeSaveTarget & saveTarget); - virtual bool onLoad(); + virtual bool onLoad(vespalib::Executor * executor); BaseName _baseFileName; diff --git a/searchlib/src/vespa/searchlib/attribute/attrvector.cpp b/searchlib/src/vespa/searchlib/attribute/attrvector.cpp index 0912c162e82..f6436fcffbb 100644 --- a/searchlib/src/vespa/searchlib/attribute/attrvector.cpp +++ b/searchlib/src/vespa/searchlib/attribute/attrvector.cpp @@ -116,7 +116,7 @@ void addString(const char * v, StringAttribute::OffsetVector & offsets, std::vec buffer.push_back('\0'); } -bool StringDirectAttribute::onLoad() +bool StringDirectAttribute::onLoad(vespalib::Executor *) { { std::vector<char> empty; diff --git a/searchlib/src/vespa/searchlib/attribute/attrvector.h b/searchlib/src/vespa/searchlib/attribute/attrvector.h index e1f8338a4ea..b4bfedac566 100644 --- a/searchlib/src/vespa/searchlib/attribute/attrvector.h +++ b/searchlib/src/vespa/searchlib/attribute/attrvector.h @@ -32,7 +32,7 @@ private: typedef typename B::EnumHandle EnumHandle; NumericDirectAttribute(const NumericDirectAttribute &); NumericDirectAttribute & operator=(const NumericDirectAttribute &); - bool onLoad() override; + bool onLoad(vespalib::Executor *executor) override; typename B::BaseType getFromEnum(EnumHandle e) const override { return _data[e]; } protected: typedef typename B::BaseType BaseType; @@ -139,7 +139,7 @@ private: StringDirectAttribute(const StringDirectAttribute &); StringDirectAttribute & operator=(const StringDirectAttribute &); void onSave(IAttributeSaveTarget & saveTarget) override; - bool onLoad() override; + bool onLoad(vespalib::Executor *executor) override; const char * getFromEnum(EnumHandle e) const override { return &_buffer[e]; } const char * getStringFromEnum(EnumHandle e) const override { return &_buffer[e]; } SearchContext::UP getSearch(QueryTermSimpleUP term, const attribute::SearchContextParams & params) const override; diff --git a/searchlib/src/vespa/searchlib/attribute/attrvector.hpp b/searchlib/src/vespa/searchlib/attribute/attrvector.hpp index 4ce7575b28d..7324044624b 100644 --- a/searchlib/src/vespa/searchlib/attribute/attrvector.hpp +++ b/searchlib/src/vespa/searchlib/attribute/attrvector.hpp @@ -22,7 +22,7 @@ template <typename B> NumericDirectAttribute<B>::~NumericDirectAttribute() = default; template <typename B> -bool NumericDirectAttribute<B>::onLoad() +bool NumericDirectAttribute<B>::onLoad(vespalib::Executor *) { auto dataBuffer = attribute::LoadUtils::loadDAT(*this); bool rc(dataBuffer.get()); diff --git a/searchlib/src/vespa/searchlib/attribute/extendableattributes.h b/searchlib/src/vespa/searchlib/attribute/extendableattributes.h index ce57daa775d..2366cddbcc9 100644 --- a/searchlib/src/vespa/searchlib/attribute/extendableattributes.h +++ b/searchlib/src/vespa/searchlib/attribute/extendableattributes.h @@ -63,7 +63,7 @@ public: this->_data.back() = v; return true; } - bool onLoad() override { + bool onLoad(vespalib::Executor *) override { return false; // Emulate that this attribute is never loaded } void onAddDocs(typename Super::DocId lidLimit) override { @@ -88,7 +88,7 @@ public: SingleStringExtAttribute(const vespalib::string & name); bool addDoc(DocId & docId) override; bool add(const char * v, int32_t w = 1) override; - bool onLoad() override { + bool onLoad(vespalib::Executor *) override { return false; // Emulate that this attribute is never loaded } void onAddDocs(DocId ) override { } @@ -139,7 +139,7 @@ public: this->checkSetMaxValueCount(idx.back() - idx[idx.size() - 2]); return true; } - bool onLoad() override { + bool onLoad(vespalib::Executor *) override { return false; // Emulate that this attribute is never loaded } void onAddDocs(uint32_t lidLimit) override { @@ -167,7 +167,7 @@ public: MultiStringExtAttribute(const vespalib::string & name); bool addDoc(DocId & docId) override; bool add(const char * v, int32_t w = 1) override; - bool onLoad() override { + bool onLoad(vespalib::Executor *) override { return false; // Emulate that this attribute is never loaded } void onAddDocs(DocId ) override { } diff --git a/searchlib/src/vespa/searchlib/attribute/flagattribute.cpp b/searchlib/src/vespa/searchlib/attribute/flagattribute.cpp index ab2a588a53d..0602141415e 100644 --- a/searchlib/src/vespa/searchlib/attribute/flagattribute.cpp +++ b/searchlib/src/vespa/searchlib/attribute/flagattribute.cpp @@ -101,14 +101,14 @@ FlagAttributeT<B>::onLoadEnumerated(ReaderBase &attrReader) } template <typename B> -bool FlagAttributeT<B>::onLoad() +bool FlagAttributeT<B>::onLoad(vespalib::Executor * executor) { for (size_t i(0), m(_bitVectors.size()); i < m; i++) { _bitVectorStore[i].reset(); _bitVectors[i] = nullptr; } _bitVectorSize = 0; - return B::onLoad(); + return B::onLoad(executor); } template <typename B> diff --git a/searchlib/src/vespa/searchlib/attribute/flagattribute.h b/searchlib/src/vespa/searchlib/attribute/flagattribute.h index d3ce5f9af46..d6ef5252578 100644 --- a/searchlib/src/vespa/searchlib/attribute/flagattribute.h +++ b/searchlib/src/vespa/searchlib/attribute/flagattribute.h @@ -29,7 +29,7 @@ private: template <class SC> friend class FlagAttributeIteratorT; template <class SC> friend class FlagAttributeIteratorStrict; }; - bool onLoad() override; + bool onLoad(vespalib::Executor *executor) override; bool onLoadEnumerated(ReaderBase &attrReader) override; AttributeVector::SearchContext::UP getSearch(std::unique_ptr<QueryTermSimple> term, const attribute::SearchContextParams & params) const override; diff --git a/searchlib/src/vespa/searchlib/attribute/multinumericattribute.h b/searchlib/src/vespa/searchlib/attribute/multinumericattribute.h index c4e8795b0b1..5d08d13b3a1 100644 --- a/searchlib/src/vespa/searchlib/attribute/multinumericattribute.h +++ b/searchlib/src/vespa/searchlib/attribute/multinumericattribute.h @@ -163,7 +163,7 @@ public: void removeOldGenerations(generation_t firstUsed) override; void onGenerationChange(generation_t generation) override; - bool onLoad() override; + bool onLoad(vespalib::Executor *executor) override; virtual bool onLoadEnumerated(ReaderBase &attrReader); AttributeVector::SearchContext::UP diff --git a/searchlib/src/vespa/searchlib/attribute/multinumericattribute.hpp b/searchlib/src/vespa/searchlib/attribute/multinumericattribute.hpp index b0aa2dcb6c0..9e634f6c341 100644 --- a/searchlib/src/vespa/searchlib/attribute/multinumericattribute.hpp +++ b/searchlib/src/vespa/searchlib/attribute/multinumericattribute.hpp @@ -128,7 +128,7 @@ MultiValueNumericAttribute<B, M>::onLoadEnumerated(ReaderBase & attrReader) template <typename B, typename M> bool -MultiValueNumericAttribute<B, M>::onLoad() +MultiValueNumericAttribute<B, M>::onLoad(vespalib::Executor *) { PrimitiveReader<MValueType> attrReader(*this); bool ok(attrReader.getHasLoadData()); diff --git a/searchlib/src/vespa/searchlib/attribute/multinumericenumattribute.h b/searchlib/src/vespa/searchlib/attribute/multinumericenumattribute.h index e6b1103d9f4..7bcc10114ad 100644 --- a/searchlib/src/vespa/searchlib/attribute/multinumericenumattribute.h +++ b/searchlib/src/vespa/searchlib/attribute/multinumericenumattribute.h @@ -151,7 +151,7 @@ protected: public: MultiValueNumericEnumAttribute(const vespalib::string & baseFileName, const AttributeVector::Config & cfg); - bool onLoad() override; + bool onLoad(vespalib::Executor *executor) override; bool onLoadEnumerated(ReaderBase &attrReader); diff --git a/searchlib/src/vespa/searchlib/attribute/multinumericenumattribute.hpp b/searchlib/src/vespa/searchlib/attribute/multinumericenumattribute.hpp index fffdbcde1bb..b5b3614196d 100644 --- a/searchlib/src/vespa/searchlib/attribute/multinumericenumattribute.hpp +++ b/searchlib/src/vespa/searchlib/attribute/multinumericenumattribute.hpp @@ -86,7 +86,7 @@ MultiValueNumericEnumAttribute<B, M>::onLoadEnumerated(ReaderBase &attrReader) template <typename B, typename M> bool -MultiValueNumericEnumAttribute<B, M>::onLoad() +MultiValueNumericEnumAttribute<B, M>::onLoad(vespalib::Executor *) { AttributeReader attrReader(*this); bool ok(attrReader.getHasLoadData()); diff --git a/searchlib/src/vespa/searchlib/attribute/predicate_attribute.cpp b/searchlib/src/vespa/searchlib/attribute/predicate_attribute.cpp index 555117126a9..dcc758549ba 100644 --- a/searchlib/src/vespa/searchlib/attribute/predicate_attribute.cpp +++ b/searchlib/src/vespa/searchlib/attribute/predicate_attribute.cpp @@ -185,7 +185,7 @@ struct DummyObserver : SimpleIndexDeserializeObserver<> { } bool -PredicateAttribute::onLoad() +PredicateAttribute::onLoad(vespalib::Executor *) { auto loaded_buffer = attribute::LoadUtils::loadDAT(*this); char *rawBuffer = const_cast<char *>(static_cast<const char *>(loaded_buffer->buffer())); diff --git a/searchlib/src/vespa/searchlib/attribute/predicate_attribute.h b/searchlib/src/vespa/searchlib/attribute/predicate_attribute.h index 4d7fd3c235b..bb6c2eb55b6 100644 --- a/searchlib/src/vespa/searchlib/attribute/predicate_attribute.h +++ b/searchlib/src/vespa/searchlib/attribute/predicate_attribute.h @@ -47,7 +47,7 @@ public: predicate::PredicateIndex &getIndex() { return *_index; } void onSave(IAttributeSaveTarget & saveTarget) override; - bool onLoad() override; + bool onLoad(vespalib::Executor *executor) override; void onCommit() override; void removeOldGenerations(generation_t firstUsed) override; void onGenerationChange(generation_t generation) override; diff --git a/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp b/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp index 8261f483e55..3ef79825263 100644 --- a/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp +++ b/searchlib/src/vespa/searchlib/attribute/reference_attribute.cpp @@ -216,7 +216,7 @@ ReferenceAttribute::onInitSave(vespalib::stringref fileName) } bool -ReferenceAttribute::onLoad() +ReferenceAttribute::onLoad(vespalib::Executor *) { ReaderBase attrReader(*this); bool ok(attrReader.getHasLoadData()); diff --git a/searchlib/src/vespa/searchlib/attribute/reference_attribute.h b/searchlib/src/vespa/searchlib/attribute/reference_attribute.h index 856dd0a9f9f..2ad516df44c 100644 --- a/searchlib/src/vespa/searchlib/attribute/reference_attribute.h +++ b/searchlib/src/vespa/searchlib/attribute/reference_attribute.h @@ -53,7 +53,7 @@ private: void onCommit() override; void onUpdateStat() override; std::unique_ptr<AttributeSaver> onInitSave(vespalib::stringref fileName) override; - bool onLoad() override; + bool onLoad(vespalib::Executor *executor) override; uint64_t getUniqueValueCount() const override; bool consider_compact_values(const CompactionStrategy &compactionStrategy); diff --git a/searchlib/src/vespa/searchlib/attribute/singleboolattribute.cpp b/searchlib/src/vespa/searchlib/attribute/singleboolattribute.cpp index 6c8edea13cf..42bc8438d8c 100644 --- a/searchlib/src/vespa/searchlib/attribute/singleboolattribute.cpp +++ b/searchlib/src/vespa/searchlib/attribute/singleboolattribute.cpp @@ -178,7 +178,7 @@ SingleBoolAttribute::getSearch(std::unique_ptr<QueryTermSimple> term, const attr } bool -SingleBoolAttribute::onLoad() +SingleBoolAttribute::onLoad(vespalib::Executor *) { PrimitiveReader<uint32_t> attrReader(*this); bool ok(attrReader.hasData()); diff --git a/searchlib/src/vespa/searchlib/attribute/singleboolattribute.h b/searchlib/src/vespa/searchlib/attribute/singleboolattribute.h index 579c77a382d..90e0f702330 100644 --- a/searchlib/src/vespa/searchlib/attribute/singleboolattribute.h +++ b/searchlib/src/vespa/searchlib/attribute/singleboolattribute.h @@ -22,7 +22,7 @@ public: bool addDoc(DocId & doc) override; void onAddDocs(DocId docIdLimit) override; void onUpdateStat() override; - bool onLoad() override; + bool onLoad(vespalib::Executor *executor) override; void onSave(IAttributeSaveTarget &saveTarget) override; void clearDocs(DocId lidLow, DocId lidLimit) override; void onShrinkLidSpace() override; diff --git a/searchlib/src/vespa/searchlib/attribute/singlenumericattribute.h b/searchlib/src/vespa/searchlib/attribute/singlenumericattribute.h index ab7cbb74b47..ee1c941035a 100644 --- a/searchlib/src/vespa/searchlib/attribute/singlenumericattribute.h +++ b/searchlib/src/vespa/searchlib/attribute/singlenumericattribute.h @@ -101,7 +101,7 @@ public: void removeOldGenerations(generation_t firstUsed) override; void onGenerationChange(generation_t generation) override; bool addDoc(DocId & doc) override; - bool onLoad() override; + bool onLoad(vespalib::Executor *executor) override; bool onLoadEnumerated(ReaderBase &attrReader); diff --git a/searchlib/src/vespa/searchlib/attribute/singlenumericattribute.hpp b/searchlib/src/vespa/searchlib/attribute/singlenumericattribute.hpp index 671bdc44e22..744a65804e6 100644 --- a/searchlib/src/vespa/searchlib/attribute/singlenumericattribute.hpp +++ b/searchlib/src/vespa/searchlib/attribute/singlenumericattribute.hpp @@ -126,7 +126,7 @@ SingleValueNumericAttribute<B>::onLoadEnumerated(ReaderBase &attrReader) template <typename B> bool -SingleValueNumericAttribute<B>::onLoad() +SingleValueNumericAttribute<B>::onLoad(vespalib::Executor *) { PrimitiveReader<T> attrReader(*this); bool ok(attrReader.getHasLoadData()); diff --git a/searchlib/src/vespa/searchlib/attribute/singlenumericenumattribute.h b/searchlib/src/vespa/searchlib/attribute/singlenumericenumattribute.h index 192af9373b6..8a448812f3e 100644 --- a/searchlib/src/vespa/searchlib/attribute/singlenumericenumattribute.h +++ b/searchlib/src/vespa/searchlib/attribute/singlenumericenumattribute.h @@ -92,7 +92,7 @@ public: ~SingleValueNumericEnumAttribute(); void onCommit() override; - bool onLoad() override; + bool onLoad(vespalib::Executor *executor) override; bool onLoadEnumerated(ReaderBase &attrReader); diff --git a/searchlib/src/vespa/searchlib/attribute/singlenumericenumattribute.hpp b/searchlib/src/vespa/searchlib/attribute/singlenumericenumattribute.hpp index 096e2146e02..49e6aa091b3 100644 --- a/searchlib/src/vespa/searchlib/attribute/singlenumericenumattribute.hpp +++ b/searchlib/src/vespa/searchlib/attribute/singlenumericenumattribute.hpp @@ -110,7 +110,7 @@ SingleValueNumericEnumAttribute<B>::onLoadEnumerated(ReaderBase &attrReader) template <typename B> bool -SingleValueNumericEnumAttribute<B>::onLoad() +SingleValueNumericEnumAttribute<B>::onLoad(vespalib::Executor *) { PrimitiveReader<T> attrReader(*this); bool ok(attrReader.getHasLoadData()); diff --git a/searchlib/src/vespa/searchlib/attribute/singlesmallnumericattribute.cpp b/searchlib/src/vespa/searchlib/attribute/singlesmallnumericattribute.cpp index 8d460b5c661..cdcc70cc01d 100644 --- a/searchlib/src/vespa/searchlib/attribute/singlesmallnumericattribute.cpp +++ b/searchlib/src/vespa/searchlib/attribute/singlesmallnumericattribute.cpp @@ -121,7 +121,7 @@ SingleValueSmallNumericAttribute::onGenerationChange(generation_t generation) bool -SingleValueSmallNumericAttribute::onLoad() +SingleValueSmallNumericAttribute::onLoad(vespalib::Executor *) { PrimitiveReader<Word> attrReader(*this); bool ok(attrReader.hasData()); diff --git a/searchlib/src/vespa/searchlib/attribute/singlesmallnumericattribute.h b/searchlib/src/vespa/searchlib/attribute/singlesmallnumericattribute.h index 965d046782b..dd637c12c8b 100644 --- a/searchlib/src/vespa/searchlib/attribute/singlesmallnumericattribute.h +++ b/searchlib/src/vespa/searchlib/attribute/singlesmallnumericattribute.h @@ -118,7 +118,7 @@ public: void removeOldGenerations(generation_t firstUsed) override; void onGenerationChange(generation_t generation) override; bool addDoc(DocId & doc) override; - bool onLoad() override; + bool onLoad(vespalib::Executor *executor) override; void onSave(IAttributeSaveTarget &saveTarget) override; SearchContext::UP diff --git a/searchlib/src/vespa/searchlib/attribute/stringbase.cpp b/searchlib/src/vespa/searchlib/attribute/stringbase.cpp index c3d7ba778ba..04eba423cf7 100644 --- a/searchlib/src/vespa/searchlib/attribute/stringbase.cpp +++ b/searchlib/src/vespa/searchlib/attribute/stringbase.cpp @@ -364,7 +364,7 @@ StringAttribute::onLoadEnumerated(ReaderBase &attrReader) } bool -StringAttribute::onLoad() +StringAttribute::onLoad(vespalib::Executor *) { ReaderBase attrReader(*this); bool ok(attrReader.getHasLoadData()); diff --git a/searchlib/src/vespa/searchlib/attribute/stringbase.h b/searchlib/src/vespa/searchlib/attribute/stringbase.h index a136a9485cc..4c6f3415927 100644 --- a/searchlib/src/vespa/searchlib/attribute/stringbase.h +++ b/searchlib/src/vespa/searchlib/attribute/stringbase.h @@ -93,7 +93,7 @@ protected: using EnumEntryType = const char*; ChangeVector _changes; Change _defaultValue; - bool onLoad() override; + bool onLoad(vespalib::Executor *executor) override; bool onLoadEnumerated(ReaderBase &attrReader); diff --git a/searchlib/src/vespa/searchlib/tensor/dense_tensor_attribute.cpp b/searchlib/src/vespa/searchlib/tensor/dense_tensor_attribute.cpp index d0943b372be..fc1585314f8 100644 --- a/searchlib/src/vespa/searchlib/tensor/dense_tensor_attribute.cpp +++ b/searchlib/src/vespa/searchlib/tensor/dense_tensor_attribute.cpp @@ -203,8 +203,9 @@ DenseTensorAttribute::extract_cells_ref(DocId docId) const } bool -DenseTensorAttribute::onLoad() +DenseTensorAttribute::onLoad(vespalib::Executor *executor) { + (void) executor; BlobSequenceReader tensorReader(*this); if (!tensorReader.hasData()) { return false; diff --git a/searchlib/src/vespa/searchlib/tensor/dense_tensor_attribute.h b/searchlib/src/vespa/searchlib/tensor/dense_tensor_attribute.h index 7eb8f2510f7..07a0c84a98b 100644 --- a/searchlib/src/vespa/searchlib/tensor/dense_tensor_attribute.h +++ b/searchlib/src/vespa/searchlib/tensor/dense_tensor_attribute.h @@ -38,7 +38,7 @@ public: std::unique_ptr<vespalib::eval::Value> getTensor(DocId docId) const override; vespalib::eval::TypedCells extract_cells_ref(DocId docId) const override; bool supports_extract_cells_ref() const override { return true; } - bool onLoad() override; + bool onLoad(vespalib::Executor *executor) override; std::unique_ptr<AttributeSaver> onInitSave(vespalib::stringref fileName) override; void compactWorst() override; uint32_t getVersion() const override; diff --git a/searchlib/src/vespa/searchlib/tensor/direct_tensor_attribute.cpp b/searchlib/src/vespa/searchlib/tensor/direct_tensor_attribute.cpp index c89f83defea..8a4ec2c0879 100644 --- a/searchlib/src/vespa/searchlib/tensor/direct_tensor_attribute.cpp +++ b/searchlib/src/vespa/searchlib/tensor/direct_tensor_attribute.cpp @@ -30,7 +30,7 @@ DirectTensorAttribute::~DirectTensorAttribute() } bool -DirectTensorAttribute::onLoad() +DirectTensorAttribute::onLoad(vespalib::Executor *) { BlobSequenceReader tensorReader(*this); if (!tensorReader.hasData()) { diff --git a/searchlib/src/vespa/searchlib/tensor/direct_tensor_attribute.h b/searchlib/src/vespa/searchlib/tensor/direct_tensor_attribute.h index dfa5ff0b3ce..6bd4ccf8e9b 100644 --- a/searchlib/src/vespa/searchlib/tensor/direct_tensor_attribute.h +++ b/searchlib/src/vespa/searchlib/tensor/direct_tensor_attribute.h @@ -21,7 +21,7 @@ public: const document::TensorUpdate &update, bool create_empty_if_non_existing) override; virtual std::unique_ptr<vespalib::eval::Value> getTensor(DocId docId) const override; - virtual bool onLoad() override; + virtual bool onLoad(vespalib::Executor *executor) override; virtual std::unique_ptr<AttributeSaver> onInitSave(vespalib::stringref fileName) override; virtual void compactWorst() override; diff --git a/searchlib/src/vespa/searchlib/tensor/serialized_fast_value_attribute.cpp b/searchlib/src/vespa/searchlib/tensor/serialized_fast_value_attribute.cpp index 260ffa1a388..2ac2d444e1a 100644 --- a/searchlib/src/vespa/searchlib/tensor/serialized_fast_value_attribute.cpp +++ b/searchlib/src/vespa/searchlib/tensor/serialized_fast_value_attribute.cpp @@ -60,7 +60,7 @@ SerializedFastValueAttribute::getTensor(DocId docId) const } bool -SerializedFastValueAttribute::onLoad() +SerializedFastValueAttribute::onLoad(vespalib::Executor *) { BlobSequenceReader tensorReader(*this); if (!tensorReader.hasData()) { diff --git a/searchlib/src/vespa/searchlib/tensor/serialized_fast_value_attribute.h b/searchlib/src/vespa/searchlib/tensor/serialized_fast_value_attribute.h index 789bf610d95..d8254e22341 100644 --- a/searchlib/src/vespa/searchlib/tensor/serialized_fast_value_attribute.h +++ b/searchlib/src/vespa/searchlib/tensor/serialized_fast_value_attribute.h @@ -24,7 +24,7 @@ public: ~SerializedFastValueAttribute() override; void setTensor(DocId docId, const vespalib::eval::Value &tensor) override; std::unique_ptr<vespalib::eval::Value> getTensor(DocId docId) const override; - bool onLoad() override; + bool onLoad(vespalib::Executor *executor) override; std::unique_ptr<AttributeSaver> onInitSave(vespalib::stringref fileName) override; void compactWorst() override; }; |