summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@oath.com>2020-05-19 14:22:00 +0000
committerHåvard Pettersen <havardpe@oath.com>2020-05-19 14:49:30 +0000
commitcdee9f2f3471fa018eadde13e1300a882a327460 (patch)
treed9211f923e210456abbb461a680934dda3467fe1 /searchcore
parent89e26b2fe42a1fd88957ec76c5e1d1532d03b380 (diff)
let compile cache use shared proton executor
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/proton.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/proton.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/searchable_doc_subdb_configurer.cpp2
3 files changed, 7 insertions, 0 deletions
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<vespalib::BlockingThreadStackExecutor>(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<vespalib::ThreadStackExecutor>(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 <vespa/vespalib/net/json_handler_repo.h>
#include <vespa/vespalib/net/state_explorer.h>
#include <vespa/vespalib/util/varholder.h>
+#include <vespa/eval/eval/llvm/compile_cache.h>
#include <mutex>
#include <shared_mutex>
@@ -112,6 +113,7 @@ private:
ProtonConfigFetcher _protonConfigFetcher;
std::unique_ptr<vespalib::ThreadStackExecutorBase> _warmupExecutor;
std::unique_ptr<vespalib::ThreadStackExecutorBase> _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 <vespa/searchcore/proton/common/indexschema_inspector.h>
#include <vespa/searchcore/proton/reference/i_document_db_reference_resolver.h>
#include <vespa/searchcore/proton/reprocessing/attribute_reprocessing_initializer.h>
+#include <vespa/eval/eval/llvm/compile_cache.h>
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)));
}