summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2021-11-11 14:15:08 +0100
committerTor Egge <Tor.Egge@online.no>2021-11-11 14:15:08 +0100
commitfb59b97efa7189d09d021cec2c7e287328553405 (patch)
tree9a53e928620e6f0b9785d603c61f2c8dd8ab54d8 /searchlib
parent5f896b2f66b395172c29fe7227d0f8c5efd8cb9d (diff)
Remove full sync of threading service in IndexMaintainer.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/document_inverter.cpp3
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/memory_index.cpp6
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/memory_index.h2
3 files changed, 2 insertions, 9 deletions
diff --git a/searchlib/src/vespa/searchlib/memoryindex/document_inverter.cpp b/searchlib/src/vespa/searchlib/memoryindex/document_inverter.cpp
index c0623aec9df..fdb2de8fb59 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/document_inverter.cpp
+++ b/searchlib/src/vespa/searchlib/memoryindex/document_inverter.cpp
@@ -54,8 +54,7 @@ DocumentInverter::DocumentInverter(DocumentInverterContext& context)
DocumentInverter::~DocumentInverter()
{
- _context.get_invert_threads().sync_all();
- _context.get_push_threads().sync_all();
+ wait_for_zero_ref_count();
}
void
diff --git a/searchlib/src/vespa/searchlib/memoryindex/memory_index.cpp b/searchlib/src/vespa/searchlib/memoryindex/memory_index.cpp
index a9d935aee3b..330320d5047 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/memory_index.cpp
+++ b/searchlib/src/vespa/searchlib/memoryindex/memory_index.cpp
@@ -72,11 +72,7 @@ MemoryIndex::MemoryIndex(const Schema& schema,
{
}
-MemoryIndex::~MemoryIndex()
-{
- _invertThreads.sync_all();
- _pushThreads.sync_all();
-}
+MemoryIndex::~MemoryIndex() = default;
void
MemoryIndex::insertDocument(uint32_t docId, const document::Document &doc, OnWriteDoneType on_write_done)
diff --git a/searchlib/src/vespa/searchlib/memoryindex/memory_index.h b/searchlib/src/vespa/searchlib/memoryindex/memory_index.h
index 6953aee7875..dc1b5d8060d 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/memory_index.h
+++ b/searchlib/src/vespa/searchlib/memoryindex/memory_index.h
@@ -121,8 +121,6 @@ public:
* Commits the inserts and removes since the last commit, making them searchable.
*
* When commit is completed, 'on_write_done' goes out of scope, scheduling completion callback.
- *
- * Callers can call pushThreads.sync() to wait for push completion.
*/
void commit(OnWriteDoneType on_write_done);