summaryrefslogtreecommitdiffstats
path: root/searchcore/src
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2021-10-28 21:03:14 +0200
committerTor Egge <Tor.Egge@online.no>2021-10-28 21:03:14 +0200
commit85115fc4804effd03d89c229be30d13a9d6471c5 (patch)
treecd28081347dda032c7d5e8ee2716f0974e9db5cc /searchcore/src
parent13472dff416a84e4295cf11e618ab17e97a59f82 (diff)
Rename ISequencedTaskExecutor::sync() to sync_all().
Diffstat (limited to 'searchcore/src')
-rw-r--r--searchcore/src/tests/proton/attribute/attribute_test.cpp2
-rw-r--r--searchcore/src/tests/proton/docsummary/docsummary.cpp4
-rw-r--r--searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp2
-rw-r--r--searchcore/src/tests/proton/index/fusionrunner_test.cpp2
-rw-r--r--searchcore/src/tests/proton/index/indexmanager_test.cpp12
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attributemanager.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_change_listener.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdb.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.cpp12
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/fast_access_feed_view.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/searchable_feed_view.cpp4
13 files changed, 29 insertions, 29 deletions
diff --git a/searchcore/src/tests/proton/attribute/attribute_test.cpp b/searchcore/src/tests/proton/attribute/attribute_test.cpp
index 7ffb26cd922..2151556b89d 100644
--- a/searchcore/src/tests/proton/attribute/attribute_test.cpp
+++ b/searchcore/src/tests/proton/attribute/attribute_test.cpp
@@ -200,7 +200,7 @@ public:
}
SerialNum test_force_commit(AttributeVector &attr, SerialNum serialNum) {
commit(serialNum);
- _attributeFieldWriter->sync();
+ _attributeFieldWriter->sync_all();
return attr.getStatus().getLastSyncToken();
}
};
diff --git a/searchcore/src/tests/proton/docsummary/docsummary.cpp b/searchcore/src/tests/proton/docsummary/docsummary.cpp
index ffe720059c6..27574cb68df 100644
--- a/searchcore/src/tests/proton/docsummary/docsummary.cpp
+++ b/searchcore/src/tests/proton/docsummary/docsummary.cpp
@@ -253,7 +253,7 @@ public:
uint64_t serialNum = _ddb->getFeedHandler().inc_serial_num();
_aw->put(serialNum, doc, lid, std::shared_ptr<IDestructorCallback>());
_aw->forceCommit(serialNum, std::shared_ptr<IDestructorCallback>());
- _ddb->getReadySubDB()->getAttributeManager()->getAttributeFieldWriter().sync();
+ _ddb->getReadySubDB()->getAttributeManager()->getAttributeFieldWriter().sync_all();
_sa->put(serialNum, lid, doc);
const GlobalId &gid = docId.getGlobalId();
BucketId bucketId(gid.convertToBucketId());
@@ -705,7 +705,7 @@ TEST("requireThatAttributesAreUsed")
.add({{"x", "a"}, {"y", "b"}}, 4)));
bjTensorAttr->commit();
});
- attributeFieldWriter.sync();
+ attributeFieldWriter.sync_all();
DocsumReply::UP rep2 = dc._ddb->getDocsums(req);
TEST_DO(assertTensor(make_tensor(TensorSpec("tensor(x{},y{})")
diff --git a/searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp b/searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp
index ded0f624474..85c91884294 100644
--- a/searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp
+++ b/searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp
@@ -164,7 +164,7 @@ void Test::requireThatMemoryIndexCanBeDumpedAndSearched() {
doc = buildDocument(doc_builder, doc_id2, word2);
memory_index.insertDocument(doc_id2, *doc.get());
memory_index.commit(std::shared_ptr<vespalib::IDestructorCallback>());
- indexFieldWriter->sync();
+ indexFieldWriter->sync_all();
testSearch(memory_index, word1, doc_id1);
testSearch(memory_index, word2, doc_id2);
diff --git a/searchcore/src/tests/proton/index/fusionrunner_test.cpp b/searchcore/src/tests/proton/index/fusionrunner_test.cpp
index 5793e366126..ca10ff01a69 100644
--- a/searchcore/src/tests/proton/index/fusionrunner_test.cpp
+++ b/searchcore/src/tests/proton/index/fusionrunner_test.cpp
@@ -182,7 +182,7 @@ void Test::createIndex(const string &dir, uint32_t id, bool fusion) {
addDocument(doc_builder, memory_index, *_selector, id, id + 1, "bar");
addDocument(doc_builder, memory_index, *_selector, id, id + 2, "baz");
addDocument(doc_builder, memory_index, *_selector, id, id + 3, "qux");
- _threadingService.indexFieldWriter().sync();
+ _threadingService.indexFieldWriter().sync_all();
const uint32_t docIdLimit =
std::min(memory_index.getDocIdLimit(), _selector->getDocIdLimit());
diff --git a/searchcore/src/tests/proton/index/indexmanager_test.cpp b/searchcore/src/tests/proton/index/indexmanager_test.cpp
index 7021f04d845..be1e2c79f70 100644
--- a/searchcore/src/tests/proton/index/indexmanager_test.cpp
+++ b/searchcore/src/tests/proton/index/indexmanager_test.cpp
@@ -145,7 +145,7 @@ struct IndexManagerTest : public ::testing::Test {
_index_manager->commit(serialNum,
emptyDestructorCallback);
});
- _writeService.indexFieldWriter().sync();
+ _writeService.indexFieldWriter().sync_all();
}
void removeDocument(uint32_t docId) {
SerialNum serialNum = ++_serial_num;
@@ -185,7 +185,7 @@ IndexManagerTest::addDocument(uint32_t id)
runAsIndex([&]() { _index_manager->putDocument(id, *doc, serialNum);
_index_manager->commit(serialNum,
emptyDestructorCallback); });
- _writeService.indexFieldWriter().sync();
+ _writeService.indexFieldWriter().sync_all();
return doc;
}
@@ -406,9 +406,9 @@ TEST_F(IndexManagerTest, require_that_flush_stats_are_calculated)
Document::UP doc = addDocument(docid);
inverter.invertDocument(docid, *doc);
- invertThreads->sync();
+ invertThreads->sync_all();
inverter.pushDocuments(std::shared_ptr<vespalib::IDestructorCallback>());
- pushThreads->sync();
+ pushThreads->sync_all();
index_size = fic.getMemoryUsage().allocatedBytes() - fixed_index_size;
/// Must account for both docid 0 being reserved and the extra after.
@@ -425,9 +425,9 @@ TEST_F(IndexManagerTest, require_that_flush_stats_are_calculated)
inverter.invertDocument(docid + 10, *doc);
doc = addDocument(docid + 100);
inverter.invertDocument(docid + 100, *doc);
- invertThreads->sync();
+ invertThreads->sync_all();
inverter.pushDocuments(std::shared_ptr<vespalib::IDestructorCallback>());
- pushThreads->sync();
+ pushThreads->sync_all();
index_size = fic.getMemoryUsage().allocatedBytes() - fixed_index_size;
/// Must account for both docid 0 being reserved and the extra after.
selector_size = (docid + 100 + 1) * sizeof(Source);
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp
index 433d2a954a3..57ab149404d 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp
@@ -652,7 +652,7 @@ void AttributeWriter::setupAttributeMapping() {
AttributeWriter::~AttributeWriter()
{
- _attributeFieldWriter.sync();
+ _attributeFieldWriter.sync_all();
}
std::vector<search::AttributeVector *>
@@ -806,7 +806,7 @@ AttributeWriter::onReplayDone(uint32_t docIdLimit)
[docIdLimit, attr = entry.second.attribute]()
{ applyReplayDone(docIdLimit, *attr); });
}
- _attributeFieldWriter.sync();
+ _attributeFieldWriter.sync_all();
}
@@ -818,7 +818,7 @@ AttributeWriter::compactLidSpace(uint32_t wantedLidLimit, SerialNum serialNum)
[wantedLidLimit, serialNum, attr=entry.second.attribute]()
{ applyCompactLidSpace(wantedLidLimit, serialNum, *attr); });
}
- _attributeFieldWriter.sync();
+ _attributeFieldWriter.sync_all();
}
bool
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attributemanager.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attributemanager.cpp
index 1c5fa0892de..4b6e67212e1 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attributemanager.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attributemanager.cpp
@@ -184,7 +184,7 @@ AttributeManager::transferExistingAttributes(const AttributeManager &currMgr,
toBeAdded.push_back(aspec);
}
}
- _attributeFieldWriter.sync();
+ _attributeFieldWriter.sync_all();
}
void
diff --git a/searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_change_listener.cpp b/searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_change_listener.cpp
index 427cbab2a14..be03b57e088 100644
--- a/searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_change_listener.cpp
+++ b/searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_change_listener.cpp
@@ -22,7 +22,7 @@ GidToLidChangeListener::GidToLidChangeListener(vespalib::ISequencedTaskExecutor
GidToLidChangeListener::~GidToLidChangeListener()
{
- _attributeFieldWriter.sync();
+ _attributeFieldWriter.sync_all();
}
void
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
index c15d100dcfa..645c9b15f07 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
@@ -524,7 +524,7 @@ DocumentDB::performDropFeedView(IFeedView::SP feedView)
// Called by executor task, delays when feed view is dropped.
// Also called by DocumentDB::receive() method to keep feed view alive
- _writeService.attributeFieldWriter().sync();
+ _writeService.attributeFieldWriter().sync_all();
_writeService.summary().sync();
// Feed view is kept alive in the closure's shared ptr.
@@ -536,8 +536,8 @@ void
DocumentDB::performDropFeedView2(IFeedView::SP feedView) {
// Called by executor task, delays when feed view is dropped.
// Also called by DocumentDB::receive() method to keep feed view alive
- _writeService.indexFieldInverter().sync();
- _writeService.indexFieldWriter().sync();
+ _writeService.indexFieldInverter().sync_all();
+ _writeService.indexFieldWriter().sync_all();
masterExecute([feedView]() { doNothing(feedView); });
}
diff --git a/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.cpp b/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.cpp
index 558ad211e7d..cb4b396d63d 100644
--- a/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.cpp
@@ -74,11 +74,11 @@ ExecutorThreadingService::syncOnce() {
if (!isMasterThread) {
_masterExecutor.sync();
}
- _attributeFieldWriter->sync();
+ _attributeFieldWriter->sync_all();
_indexExecutor->sync();
_summaryExecutor->sync();
- _indexFieldInverter->sync();
- _indexFieldWriter->sync();
+ _indexFieldInverter->sync_all();
+ _indexFieldWriter->sync_all();
if (!isMasterThread) {
_masterExecutor.sync();
}
@@ -89,13 +89,13 @@ ExecutorThreadingService::shutdown()
{
_masterExecutor.shutdown();
_masterExecutor.sync();
- _attributeFieldWriter->sync();
+ _attributeFieldWriter->sync_all();
_summaryExecutor->shutdown();
_summaryExecutor->sync();
_indexExecutor->shutdown();
_indexExecutor->sync();
- _indexFieldInverter->sync();
- _indexFieldWriter->sync();
+ _indexFieldInverter->sync_all();
+ _indexFieldWriter->sync_all();
}
void
diff --git a/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp b/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp
index 01afcdfe8bc..5bd9ba64bae 100644
--- a/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp
@@ -314,7 +314,7 @@ FastAccessDocSubDB::onReprocessDone(SerialNum serialNum)
IFeedView::SP feedView = _iFeedView.get();
IAttributeWriter::SP attrWriter = static_cast<FastAccessFeedView &>(*feedView).getAttributeWriter();
attrWriter->forceCommit(serialNum, std::shared_ptr<vespalib::IDestructorCallback>());
- _writeService.attributeFieldWriter().sync();
+ _writeService.attributeFieldWriter().sync_all();
_writeService.summary().sync();
Parent::onReprocessDone(serialNum);
}
diff --git a/searchcore/src/vespa/searchcore/proton/server/fast_access_feed_view.cpp b/searchcore/src/vespa/searchcore/proton/server/fast_access_feed_view.cpp
index 747f6200962..b8985a83ef1 100644
--- a/searchcore/src/vespa/searchcore/proton/server/fast_access_feed_view.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/fast_access_feed_view.cpp
@@ -91,7 +91,7 @@ void
FastAccessFeedView::sync()
{
Parent::sync();
- _writeService.attributeFieldWriter().sync();
+ _writeService.attributeFieldWriter().sync_all();
}
} // namespace proton
diff --git a/searchcore/src/vespa/searchcore/proton/server/searchable_feed_view.cpp b/searchcore/src/vespa/searchcore/proton/server/searchable_feed_view.cpp
index 829725b92e5..5ee3f17e127 100644
--- a/searchcore/src/vespa/searchcore/proton/server/searchable_feed_view.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/searchable_feed_view.cpp
@@ -44,8 +44,8 @@ SearchableFeedView::performSync()
{
// Called by index write thread, delays when sync() method on it completes.
assert(_writeService.index().isCurrentThread());
- _writeService.indexFieldInverter().sync();
- _writeService.indexFieldWriter().sync();
+ _writeService.indexFieldInverter().sync_all();
+ _writeService.indexFieldWriter().sync_all();
}
void