diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-11-26 06:18:25 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2021-11-26 06:18:25 +0000 |
commit | 67271ce7ffbbfadf17c734730e697b4ba0c2f905 (patch) | |
tree | e2ea2a22a4b033871cd75009c906e9bc049ad958 /searchcore | |
parent | 9fbf810f494d2907b4583db3a97435fbcfede162 (diff) |
Remove sync_all_executors from IThreadingService interface.
Diffstat (limited to 'searchcore')
6 files changed, 7 insertions, 19 deletions
diff --git a/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp b/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp index a030ce1c455..fb9b10aa5a2 100644 --- a/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp +++ b/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp @@ -514,7 +514,8 @@ struct FixtureBase template <typename FunctionType> void runInMasterAndSyncAll(FunctionType func) { - test::runInMasterAndSyncAll(_writeService, func); + test::runInMaster(_writeService, func); + _writeServiceReal.sync_all_executors(); } template <typename FunctionType> void runInMaster(FunctionType func) { diff --git a/searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp b/searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp index 7ccaa6e9fbf..526b94a3525 100644 --- a/searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp +++ b/searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp @@ -242,7 +242,8 @@ struct FixtureBase { template <typename FunctionType> void runInMasterAndSyncAll(FunctionType func) { - test::runInMasterAndSyncAll(writeService, func); + test::runInMaster(writeService, func); + writeService.sync_all_executors(); } template <typename FunctionType> void runInMasterAndSync(FunctionType func) { diff --git a/searchcore/src/tests/proton/documentmetastore/lidreusedelayer/lidreusedelayer_test.cpp b/searchcore/src/tests/proton/documentmetastore/lidreusedelayer/lidreusedelayer_test.cpp index 8265585a038..8d8872b8998 100644 --- a/searchcore/src/tests/proton/documentmetastore/lidreusedelayer/lidreusedelayer_test.cpp +++ b/searchcore/src/tests/proton/documentmetastore/lidreusedelayer/lidreusedelayer_test.cpp @@ -137,7 +137,8 @@ public: template <typename FunctionType> void runInMasterAndSyncAll(FunctionType func) { - test::runInMasterAndSyncAll(_writeService, func); + test::runInMaster(_writeService, func); + _writeServiceReal.sync_all_executors(); } template <typename FunctionType> diff --git a/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.h b/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.h index 629c5043ed7..c8eda4e86f3 100644 --- a/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.h +++ b/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.h @@ -47,7 +47,7 @@ public: uint32_t stackSize = 128 * 1024); ~ExecutorThreadingService() override; - void sync_all_executors() override; + void sync_all_executors(); void blocking_master_execute(vespalib::Executor::Task::UP task) override; diff --git a/searchcore/src/vespa/searchcore/proton/test/thread_utils.h b/searchcore/src/vespa/searchcore/proton/test/thread_utils.h index 0c6af0a4d25..d193a9555c3 100644 --- a/searchcore/src/vespa/searchcore/proton/test/thread_utils.h +++ b/searchcore/src/vespa/searchcore/proton/test/thread_utils.h @@ -7,17 +7,6 @@ namespace proton::test { /** - * Run the given function in the master thread and wait until all threads done. - */ -template <typename FunctionType> -void -runInMasterAndSyncAll(searchcorespi::index::IThreadingService &writeService, FunctionType func) -{ - writeService.master().execute(vespalib::makeLambdaTask(std::move(func))); - writeService.sync_all_executors(); -} - -/** * Run the given function in the master thread and wait until done. */ template <typename FunctionType> diff --git a/searchcore/src/vespa/searchcore/proton/test/threading_service_observer.h b/searchcore/src/vespa/searchcore/proton/test/threading_service_observer.h index 46527362091..135c9dc0a07 100644 --- a/searchcore/src/vespa/searchcore/proton/test/threading_service_observer.h +++ b/searchcore/src/vespa/searchcore/proton/test/threading_service_observer.h @@ -33,10 +33,6 @@ public: return _summary; } - void sync_all_executors() override { - _service.sync_all_executors(); - } - void blocking_master_execute(vespalib::Executor::Task::UP task) override { _service.blocking_master_execute(std::move(task)); } |