diff options
Diffstat (limited to 'searchlib/src/tests/memoryindex/field_index/field_index_test.cpp')
-rw-r--r-- | searchlib/src/tests/memoryindex/field_index/field_index_test.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/searchlib/src/tests/memoryindex/field_index/field_index_test.cpp b/searchlib/src/tests/memoryindex/field_index/field_index_test.cpp index bde78a6229f..7cf40a5be63 100644 --- a/searchlib/src/tests/memoryindex/field_index/field_index_test.cpp +++ b/searchlib/src/tests/memoryindex/field_index/field_index_test.cpp @@ -415,7 +415,7 @@ myremove(uint32_t docId, DocumentInverter &inv, ISequencedTaskExecutor &invertThreads) { inv.removeDocument(docId); - invertThreads.sync(); + invertThreads.sync_all(); inv.pushDocuments(std::shared_ptr<vespalib::IDestructorCallback>()); } @@ -480,7 +480,7 @@ myCommit(FieldIndexCollection &fieldIndexes, ISequencedTaskExecutor &pushThreads { fieldIndex->commit(); }); ++fieldId; } - pushThreads.sync(); + pushThreads.sync_all(); } void @@ -950,9 +950,9 @@ TEST_F(BasicInverterTest, require_that_inversion_is_working) endField(); doc = _b.endDocument(); _inv.invertDocument(10, *doc); - _invertThreads->sync(); + _invertThreads->sync_all(); myPushDocument(_inv); - _pushThreads->sync(); + _pushThreads->sync_all(); _b.startDocument("id:ns:searchdocument::20"); _b.startIndexField("f0"). @@ -960,9 +960,9 @@ TEST_F(BasicInverterTest, require_that_inversion_is_working) endField(); doc = _b.endDocument(); _inv.invertDocument(20, *doc); - _invertThreads->sync(); + _invertThreads->sync_all(); myPushDocument(_inv); - _pushThreads->sync(); + _pushThreads->sync_all(); _b.startDocument("id:ns:searchdocument::30"); _b.startIndexField("f0"). @@ -991,9 +991,9 @@ TEST_F(BasicInverterTest, require_that_inversion_is_working) endField(); doc = _b.endDocument(); _inv.invertDocument(30, *doc); - _invertThreads->sync(); + _invertThreads->sync_all(); myPushDocument(_inv); - _pushThreads->sync(); + _pushThreads->sync_all(); _b.startDocument("id:ns:searchdocument::40"); _b.startIndexField("f0"). @@ -1002,9 +1002,9 @@ TEST_F(BasicInverterTest, require_that_inversion_is_working) endField(); doc = _b.endDocument(); _inv.invertDocument(40, *doc); - _invertThreads->sync(); + _invertThreads->sync_all(); myPushDocument(_inv); - _pushThreads->sync(); + _pushThreads->sync_all(); _b.startDocument("id:ns:searchdocument::999"); _b.startIndexField("f0"). @@ -1032,12 +1032,12 @@ TEST_F(BasicInverterTest, require_that_inversion_is_working) doc = _b.endDocument(); for (uint32_t docId = 10000; docId < 20000; ++docId) { _inv.invertDocument(docId, *doc); - _invertThreads->sync(); + _invertThreads->sync_all(); myPushDocument(_inv); - _pushThreads->sync(); + _pushThreads->sync_all(); } - _pushThreads->sync(); + _pushThreads->sync_all(); DataStoreBase::MemStats beforeStats = getFeatureStoreMemStats(_fic); LOG(info, "Before feature compaction: allocElems=%zu, usedElems=%zu" @@ -1149,17 +1149,17 @@ TEST_F(BasicInverterTest, require_that_inverter_handles_remove_via_document_remo _b.startIndexField("f1").addStr("a").addStr("c").endField(); Document::UP doc1 = _b.endDocument(); _inv.invertDocument(1, *doc1.get()); - _invertThreads->sync(); + _invertThreads->sync_all(); myPushDocument(_inv); - _pushThreads->sync(); + _pushThreads->sync_all(); _b.startDocument("id:ns:searchdocument::2"); _b.startIndexField("f0").addStr("b").addStr("c").endField(); Document::UP doc2 = _b.endDocument(); _inv.invertDocument(2, *doc2.get()); - _invertThreads->sync(); + _invertThreads->sync_all(); myPushDocument(_inv); - _pushThreads->sync(); + _pushThreads->sync_all(); EXPECT_TRUE(assertPostingList("[1]", find("a", 0))); EXPECT_TRUE(assertPostingList("[1,2]", find("b", 0))); @@ -1168,7 +1168,7 @@ TEST_F(BasicInverterTest, require_that_inverter_handles_remove_via_document_remo EXPECT_TRUE(assertPostingList("[1]", find("c", 1))); myremove(1, _inv, *_invertThreads); - _pushThreads->sync(); + _pushThreads->sync_all(); EXPECT_TRUE(assertPostingList("[]", find("a", 0))); EXPECT_TRUE(assertPostingList("[2]", find("b", 0))); @@ -1318,10 +1318,10 @@ TEST_F(UriInverterTest, require_that_uri_indexing_is_working) endField(); doc = _b.endDocument(); _inv.invertDocument(10, *doc); - _invertThreads->sync(); + _invertThreads->sync_all(); myPushDocument(_inv); - _pushThreads->sync(); + _pushThreads->sync_all(); SimpleMatchData match_data; { @@ -1394,10 +1394,10 @@ TEST_F(CjkInverterTest, require_that_cjk_indexing_is_working) endField(); doc = _b.endDocument(); _inv.invertDocument(10, *doc); - _invertThreads->sync(); + _invertThreads->sync_all(); myPushDocument(_inv); - _pushThreads->sync(); + _pushThreads->sync_all(); SimpleMatchData match_data; uint32_t fieldId = _schema.getIndexFieldId("f0"); @@ -1472,7 +1472,7 @@ struct RemoverTest : public FieldIndexCollectionTest { void remove(uint32_t docId) { DocumentInverter inv(schema, *_invertThreads, *_pushThreads, fic); myremove(docId, inv, *_invertThreads); - _pushThreads->sync(); + _pushThreads->sync_all(); EXPECT_FALSE(fic.getFieldIndex(0u)->getDocumentRemover(). getStore().get(docId).valid()); } |