From cdee9f2f3471fa018eadde13e1300a882a327460 Mon Sep 17 00:00:00 2001 From: HÃ¥vard Pettersen Date: Tue, 19 May 2020 14:22:00 +0000 Subject: let compile cache use shared proton executor --- searchcore/src/vespa/searchcore/proton/server/proton.cpp | 3 +++ searchcore/src/vespa/searchcore/proton/server/proton.h | 2 ++ .../vespa/searchcore/proton/server/searchable_doc_subdb_configurer.cpp | 2 ++ 3 files changed, 7 insertions(+) (limited to 'searchcore/src') diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.cpp b/searchcore/src/vespa/searchcore/proton/server/proton.cpp index c7000119861..719ba359ccf 100644 --- a/searchcore/src/vespa/searchcore/proton/server/proton.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/proton.cpp @@ -212,6 +212,7 @@ Proton::Proton(const config::ConfigUri & configUri, _protonConfigFetcher(configUri, _protonConfigurer, subscribeTimeout), _warmupExecutor(), _sharedExecutor(), + _compile_cache_executor_binding(), _queryLimiter(), _clock(0.001), _threadPool(128 * 1024), @@ -302,6 +303,7 @@ Proton::init(const BootstrapConfig::SP & configSnapshot) const size_t sharedThreads = deriveCompactionCompressionThreads(protonConfig, hwInfo.cpu()); _sharedExecutor = std::make_unique(sharedThreads, 128*1024, sharedThreads*16, proton_shared_executor); + _compile_cache_executor_binding = vespalib::eval::CompileCache::bind(*_sharedExecutor); InitializeThreads initializeThreads; if (protonConfig.initialize.threads > 0) { initializeThreads = std::make_shared(protonConfig.initialize.threads, 128 * 1024, initialize_executor); @@ -454,6 +456,7 @@ Proton::~Proton() _persistenceEngine.reset(); _tls.reset(); _warmupExecutor.reset(); + _compile_cache_executor_binding.reset(); _sharedExecutor.reset(); _clock.stop(); LOG(debug, "Explicit destructor done"); diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.h b/searchcore/src/vespa/searchcore/proton/server/proton.h index 4c9d4c77cc4..d0b76bd5804 100644 --- a/searchcore/src/vespa/searchcore/proton/server/proton.h +++ b/searchcore/src/vespa/searchcore/proton/server/proton.h @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -112,6 +113,7 @@ private: ProtonConfigFetcher _protonConfigFetcher; std::unique_ptr _warmupExecutor; std::unique_ptr _sharedExecutor; + vespalib::eval::CompileCache::ExecutorBinding::UP _compile_cache_executor_binding; matching::QueryLimiter _queryLimiter; vespalib::Clock _clock; FastOS_ThreadPool _threadPool; diff --git a/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.cpp b/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.cpp index 9ef038b7325..c4a0ac5e099 100644 --- a/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.cpp @@ -9,6 +9,7 @@ #include #include #include +#include using namespace vespa::config::search; using namespace config; @@ -87,6 +88,7 @@ void SearchableDocSubDBConfigurer::reconfigureSearchView(MatchView::SP matchView) { SearchView::SP curr = _searchView.get(); + vespalib::eval::CompileCache::wait_pending(); _searchView.set(SearchView::create(curr->getSummarySetup(), std::move(matchView))); } -- cgit v1.2.3