aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-11-23 14:42:42 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2021-11-23 14:48:57 +0000
commit6ca94ffd94931023c51af21effee49f8dfc01fef (patch)
tree267354537445d8a5169b483d3570b04819c488cc /searchcore
parentbaa10a7a7762766d4b32d484bc21283cac543993 (diff)
GC redundant sync_all_executors from DocumentDB::close
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdb.cpp7
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.cpp9
2 files changed, 7 insertions, 9 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
index cc05fc7169c..0d45a287fdc 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
@@ -551,7 +551,10 @@ DocumentDB::close()
// Caller should have removed document DB from feed router.
_refCount.waitForZeroRefCount();
- _writeService.sync_all_executors();
+ masterExecute([this] () {
+ _feedView.get()->forceCommitAndWait(search::CommitParam(getCurrentSerialNumber()));
+ });
+ _writeService.master().sync();
// The attributes in the ready sub db is also the total set of attributes.
DocumentDBTaggedMetrics &metrics = getMetrics();
@@ -559,10 +562,8 @@ DocumentDB::close()
_metricsWireService.cleanAttributes(metrics.notReady.attributes);
masterExecute([this] () {
- _feedView.get()->forceCommitAndWait(search::CommitParam(getCurrentSerialNumber()));
closeSubDBs();
});
- _writeService.sync_all_executors();
// What about queued tasks ?
_writeService.shutdown();
_maintenanceController.kill();
diff --git a/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.cpp b/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.cpp
index dcd29c9ddcb..145dc48a57a 100644
--- a/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.cpp
@@ -128,13 +128,10 @@ ExecutorThreadingService::syncOnce() {
void
ExecutorThreadingService::shutdown()
{
- _masterExecutor.shutdown();
- _masterExecutor.sync();
+ _masterExecutor.shutdown().sync();
_attribute_field_writer_ptr->sync_all();
- _summaryExecutor->shutdown();
- _summaryExecutor->sync();
- _indexExecutor->shutdown();
- _indexExecutor->sync();
+ _summaryExecutor->shutdown().sync();
+ _indexExecutor->shutdown().sync();
_index_field_inverter_ptr->sync_all();
_index_field_writer_ptr->sync_all();
}