diff options
author | Geir Storli <geirst@verizonmedia.com> | 2020-06-12 14:07:49 +0000 |
---|---|---|
committer | Geir Storli <geirst@verizonmedia.com> | 2020-06-15 08:05:53 +0000 |
commit | 8c0fa90a06966d7f6411e915b7c0d6906c53b130 (patch) | |
tree | baa17856f237d4aff8022fee8272171c41979884 /searchlib | |
parent | a600b2141c93c668d0f6aa4c2b5bc680e8eaf380 (diff) |
Implement initial support for two-phase puts in attribute writer.
This is only turned on for tensor attributes with a hnsw index that allows multi-threaded indexing.
Diffstat (limited to 'searchlib')
-rw-r--r-- | searchlib/src/vespa/searchlib/tensor/tensor_attribute.cpp | 2 | ||||
-rw-r--r-- | searchlib/src/vespa/searchlib/tensor/tensor_attribute.h | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/searchlib/src/vespa/searchlib/tensor/tensor_attribute.cpp b/searchlib/src/vespa/searchlib/tensor/tensor_attribute.cpp index 979eedec58a..c2a1243f341 100644 --- a/searchlib/src/vespa/searchlib/tensor/tensor_attribute.cpp +++ b/searchlib/src/vespa/searchlib/tensor/tensor_attribute.cpp @@ -263,7 +263,7 @@ TensorAttribute::prepare_set_tensor(DocId docid, const Tensor& tensor) const void TensorAttribute::complete_set_tensor(DocId docid, const Tensor& tensor, - std::future<std::unique_ptr<PrepareResult>> prepare_result) + std::unique_ptr<PrepareResult> prepare_result) { (void) docid; (void) tensor; diff --git a/searchlib/src/vespa/searchlib/tensor/tensor_attribute.h b/searchlib/src/vespa/searchlib/tensor/tensor_attribute.h index f752b9f7f2e..8380e485172 100644 --- a/searchlib/src/vespa/searchlib/tensor/tensor_attribute.h +++ b/searchlib/src/vespa/searchlib/tensor/tensor_attribute.h @@ -7,7 +7,6 @@ #include "tensor_store.h" #include <vespa/searchlib/attribute/not_implemented_attribute.h> #include <vespa/vespalib/util/rcuvector.h> -#include <future> namespace search::tensor { @@ -66,9 +65,9 @@ public: * Performs the complete step in a two-phase operation to set a tensor for a document. * * This function is only called by the attribute writer thread. - * It must wait for the result from the prepare step (via the future) before it does the modifying changes. + * It uses the result from the prepare step to do the modifying changes. */ - virtual void complete_set_tensor(DocId docid, const Tensor& tensor, std::future<std::unique_ptr<PrepareResult>> prepare_result); + virtual void complete_set_tensor(DocId docid, const Tensor& tensor, std::unique_ptr<PrepareResult> prepare_result); virtual void compactWorst() = 0; }; |