aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/tests/proton/index/indexcollection_test.cpp14
-rw-r--r--searchcore/src/vespa/searchcore/proton/index/index_manager_initializer.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/index/index_manager_initializer.h4
-rw-r--r--searchcore/src/vespa/searchcore/proton/index/indexmanager.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/index/indexmanager.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdb.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdb.h19
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.h4
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/proton_thread_pools_explorer.cpp14
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/proton_thread_pools_explorer.h26
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h6
12 files changed, 49 insertions, 50 deletions
diff --git a/searchcore/src/tests/proton/index/indexcollection_test.cpp b/searchcore/src/tests/proton/index/indexcollection_test.cpp
index 07fbacde49a..70141f057bf 100644
--- a/searchcore/src/tests/proton/index/indexcollection_test.cpp
+++ b/searchcore/src/tests/proton/index/indexcollection_test.cpp
@@ -25,7 +25,7 @@ public:
MockIndexSearchable()
: _field_length_info()
{}
- MockIndexSearchable(const FieldLengthInfo& field_length_info)
+ explicit MockIndexSearchable(const FieldLengthInfo& field_length_info)
: _field_length_info(field_length_info)
{}
FieldLengthInfo get_field_length_info(const vespalib::string& field_name) const override {
@@ -79,17 +79,17 @@ public:
return std::make_unique<WarmupIndexCollection>(WarmupConfig(1s, false), prev, next, *_warmup, _executor, *this);
}
- virtual void warmupDone(ISearchableIndexCollection::SP current) override {
+ void warmupDone(std::shared_ptr<WarmupIndexCollection> current) override {
(void) current;
}
IndexCollectionTest()
- : _selector(new FixedSourceSelector(0, "fs1")),
- _source1(new MockIndexSearchable({3, 5})),
- _source2(new MockIndexSearchable({7, 11})),
- _fusion_source(new FakeIndexSearchable),
+ : _selector(std::make_shared<FixedSourceSelector>(0, "fs1")),
+ _source1(std::make_shared<MockIndexSearchable>(FieldLengthInfo(3, 5))),
+ _source2(std::make_shared<MockIndexSearchable>(FieldLengthInfo(7, 11))),
+ _fusion_source(std::make_shared<FakeIndexSearchable>()),
_executor(1, 128_Ki),
- _warmup(new FakeIndexSearchable)
+ _warmup(std::make_shared<FakeIndexSearchable>())
{}
~IndexCollectionTest() = default;
};
diff --git a/searchcore/src/vespa/searchcore/proton/index/index_manager_initializer.cpp b/searchcore/src/vespa/searchcore/proton/index/index_manager_initializer.cpp
index 9e915779d92..630c536a1ca 100644
--- a/searchcore/src/vespa/searchcore/proton/index/index_manager_initializer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/index/index_manager_initializer.cpp
@@ -15,7 +15,7 @@ IndexManagerInitializer(const vespalib::string &baseDir,
search::SerialNum serialNum,
searchcorespi::IIndexManager::Reconfigurer & reconfigurer,
searchcorespi::index::IThreadingService & threadingService,
- vespalib::SyncableThreadExecutor & warmupExecutor,
+ vespalib::Executor & warmupExecutor,
const search::TuneFileIndexManager & tuneFileIndexManager,
const search::TuneFileAttributes &tuneFileAttributes,
const search::common::FileHeaderContext & fileHeaderContext,
diff --git a/searchcore/src/vespa/searchcore/proton/index/index_manager_initializer.h b/searchcore/src/vespa/searchcore/proton/index/index_manager_initializer.h
index a7acfb61d54..3cf1daf631e 100644
--- a/searchcore/src/vespa/searchcore/proton/index/index_manager_initializer.h
+++ b/searchcore/src/vespa/searchcore/proton/index/index_manager_initializer.h
@@ -20,7 +20,7 @@ class IndexManagerInitializer : public initializer::InitializerTask
search::SerialNum _serialNum;
searchcorespi::IIndexManager::Reconfigurer &_reconfigurer;
searchcorespi::index::IThreadingService &_threadingService;
- vespalib::SyncableThreadExecutor &_warmupExecutor;
+ vespalib::Executor &_warmupExecutor;
const search::TuneFileIndexManager _tuneFileIndexManager;
const search::TuneFileAttributes _tuneFileAttributes;
const search::common::FileHeaderContext &_fileHeaderContext;
@@ -33,7 +33,7 @@ public:
search::SerialNum serialNum,
searchcorespi::IIndexManager::Reconfigurer & reconfigurer,
searchcorespi::index::IThreadingService & threadingService,
- vespalib::SyncableThreadExecutor & warmupExecutor,
+ vespalib::Executor & warmupExecutor,
const search::TuneFileIndexManager & tuneFileIndexManager,
const search::TuneFileAttributes & tuneFileAttributes,
const search::common::FileHeaderContext & fileHeaderContext,
diff --git a/searchcore/src/vespa/searchcore/proton/index/indexmanager.cpp b/searchcore/src/vespa/searchcore/proton/index/indexmanager.cpp
index 169ba149297..de397e81d76 100644
--- a/searchcore/src/vespa/searchcore/proton/index/indexmanager.cpp
+++ b/searchcore/src/vespa/searchcore/proton/index/indexmanager.cpp
@@ -80,7 +80,7 @@ IndexManager::IndexManager(const vespalib::string &baseDir,
SerialNum serialNum,
Reconfigurer &reconfigurer,
IThreadingService &threadingService,
- vespalib::SyncableThreadExecutor & warmupExecutor,
+ vespalib::Executor & warmupExecutor,
const search::TuneFileIndexManager &tuneFileIndexManager,
const search::TuneFileAttributes &tuneFileAttributes,
const FileHeaderContext &fileHeaderContext) :
diff --git a/searchcore/src/vespa/searchcore/proton/index/indexmanager.h b/searchcore/src/vespa/searchcore/proton/index/indexmanager.h
index 4113af30b0d..436b4127804 100644
--- a/searchcore/src/vespa/searchcore/proton/index/indexmanager.h
+++ b/searchcore/src/vespa/searchcore/proton/index/indexmanager.h
@@ -73,7 +73,7 @@ public:
SerialNum serialNum,
Reconfigurer &reconfigurer,
searchcorespi::index::IThreadingService &threadingService,
- vespalib::SyncableThreadExecutor & warmupExecutor,
+ vespalib::Executor & warmupExecutor,
const search::TuneFileIndexManager &tuneFileIndexManager,
const search::TuneFileAttributes &tuneFileAttributes,
const search::common::FileHeaderContext &fileHeaderContext);
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
index 0d45a287fdc..e5bf5013528 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
@@ -131,7 +131,7 @@ DocumentDB::create(const vespalib::string &baseDir,
document::BucketSpace bucketSpace,
const ProtonConfig &protonCfg,
IDocumentDBOwner &owner,
- vespalib::SyncableThreadExecutor &warmupExecutor,
+ vespalib::ThreadExecutor &warmupExecutor,
vespalib::ThreadExecutor &sharedExecutor,
storage::spi::BucketExecutor &bucketExecutor,
const search::transactionlog::WriterFactory &tlsWriterFactory,
@@ -155,7 +155,7 @@ DocumentDB::DocumentDB(const vespalib::string &baseDir,
document::BucketSpace bucketSpace,
const ProtonConfig &protonCfg,
IDocumentDBOwner &owner,
- vespalib::SyncableThreadExecutor &warmupExecutor,
+ vespalib::Executor &warmupExecutor,
vespalib::ThreadExecutor &sharedExecutor,
storage::spi::BucketExecutor & bucketExecutor,
const search::transactionlog::WriterFactory &tlsWriterFactory,
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdb.h b/searchcore/src/vespa/searchcore/proton/server/documentdb.h
index 391c11df276..ee414db28bf 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdb.h
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdb.h
@@ -71,10 +71,15 @@ class DocumentDB : public DocumentDBConfigOwner,
public std::enable_shared_from_this<DocumentDB>
{
private:
- using InitializeThreads = std::shared_ptr<vespalib::SyncableThreadExecutor>;
+ using InitializeThreads = std::shared_ptr<vespalib::ThreadExecutor>;
using IFlushTargetList = std::vector<std::shared_ptr<searchcorespi::IFlushTarget>>;
using StatusReportUP = std::unique_ptr<StatusReport>;
using ProtonConfig = const vespa::config::search::core::internal::InternalProtonType;
+ using ConfigComparisonResult = DocumentDBConfig::ComparisonResult;
+ using lock_guard = std::lock_guard<std::mutex>;
+ using SerialNum = search::SerialNum;
+ using Schema = search::index::Schema;
+
DocTypeName _docTypeName;
document::BucketSpace _bucketSpace;
@@ -85,9 +90,6 @@ private:
// threads for initializer tasks during proton startup
InitializeThreads _initializeThreads;
- typedef search::SerialNum SerialNum;
- typedef search::index::Schema Schema;
- using lock_guard = std::lock_guard<std::mutex>;
// variables related to reconfig
DocumentDBConfig::SP _initConfigSnapshot;
SerialNum _initConfigSerialNum;
@@ -97,10 +99,7 @@ private:
DocumentDBConfig::SP _activeConfigSnapshot;
int64_t _activeConfigSnapshotGeneration;
const bool _validateAndSanitizeDocStore;
-
- vespalib::Gate _initGate;
-
- typedef DocumentDBConfig::ComparisonResult ConfigComparisonResult;
+ vespalib::Gate _initGate;
ClusterStateHandler _clusterStateHandler;
BucketHandler _bucketHandler;
@@ -201,7 +200,7 @@ private:
document::BucketSpace bucketSpace,
const ProtonConfig &protonCfg,
IDocumentDBOwner &owner,
- vespalib::SyncableThreadExecutor &warmupExecutor,
+ vespalib::Executor &warmupExecutor,
vespalib::ThreadExecutor &sharedExecutor,
storage::spi::BucketExecutor &bucketExecutor,
const search::transactionlog::WriterFactory &tlsWriterFactory,
@@ -233,7 +232,7 @@ public:
document::BucketSpace bucketSpace,
const ProtonConfig &protonCfg,
IDocumentDBOwner &owner,
- vespalib::SyncableThreadExecutor &warmupExecutor,
+ vespalib::ThreadExecutor &warmupExecutor,
vespalib::ThreadExecutor &sharedExecutor,
storage::spi::BucketExecutor & bucketExecutor,
const search::transactionlog::WriterFactory &tlsWriterFactory,
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.cpp b/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.cpp
index 6576e4ead97..3c9bdb2ec5f 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.cpp
@@ -26,7 +26,7 @@ DocumentSubDBCollection::DocumentSubDBCollection(
const IGetSerialNum &getSerialNum,
const DocTypeName &docTypeName,
searchcorespi::index::IThreadingService &writeService,
- vespalib::SyncableThreadExecutor &warmupExecutor,
+ vespalib::Executor &warmupExecutor,
const search::common::FileHeaderContext &fileHeaderContext,
MetricsWireService &metricsWireService,
DocumentDBTaggedMetrics &metrics,
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.h b/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.h
index 515a886969c..ca092bb0957 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.h
+++ b/searchcore/src/vespa/searchcore/proton/server/documentsubdbcollection.h
@@ -12,7 +12,7 @@
namespace vespalib {
class Clock;
- class SyncableThreadExecutor;
+ class Executor;
class ThreadStackExecutorBase;
}
@@ -86,7 +86,7 @@ public:
const IGetSerialNum &getSerialNum,
const DocTypeName &docTypeName,
searchcorespi::index::IThreadingService &writeService,
- vespalib::SyncableThreadExecutor &warmupExecutor,
+ vespalib::Executor &warmupExecutor,
const search::common::FileHeaderContext &fileHeaderContext,
MetricsWireService &metricsWireService,
DocumentDBTaggedMetrics &metrics,
diff --git a/searchcore/src/vespa/searchcore/proton/server/proton_thread_pools_explorer.cpp b/searchcore/src/vespa/searchcore/proton/server/proton_thread_pools_explorer.cpp
index 73c63da622d..70195980376 100644
--- a/searchcore/src/vespa/searchcore/proton/server/proton_thread_pools_explorer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/proton_thread_pools_explorer.cpp
@@ -5,18 +5,18 @@
#include <vespa/vespalib/data/slime/cursor.h>
#include <vespa/vespalib/util/threadexecutor.h>
-using vespalib::SyncableThreadExecutor;
+using vespalib::ThreadExecutor;
namespace proton {
using explorer::convert_executor_to_slime;
-ProtonThreadPoolsExplorer::ProtonThreadPoolsExplorer(const SyncableThreadExecutor* shared,
- const SyncableThreadExecutor* match,
- const SyncableThreadExecutor* docsum,
- const SyncableThreadExecutor* flush,
- const SyncableThreadExecutor* proton,
- const SyncableThreadExecutor* warmup)
+ProtonThreadPoolsExplorer::ProtonThreadPoolsExplorer(const ThreadExecutor* shared,
+ const ThreadExecutor* match,
+ const ThreadExecutor* docsum,
+ const ThreadExecutor* flush,
+ const ThreadExecutor* proton,
+ const ThreadExecutor* warmup)
: _shared(shared),
_match(match),
_docsum(docsum),
diff --git a/searchcore/src/vespa/searchcore/proton/server/proton_thread_pools_explorer.h b/searchcore/src/vespa/searchcore/proton/server/proton_thread_pools_explorer.h
index 7f0873a750d..76c5fa8cfb0 100644
--- a/searchcore/src/vespa/searchcore/proton/server/proton_thread_pools_explorer.h
+++ b/searchcore/src/vespa/searchcore/proton/server/proton_thread_pools_explorer.h
@@ -4,7 +4,7 @@
#include <vespa/vespalib/net/state_explorer.h>
-namespace vespalib { class SyncableThreadExecutor; }
+namespace vespalib { class ThreadExecutor; }
namespace proton {
@@ -13,20 +13,20 @@ namespace proton {
*/
class ProtonThreadPoolsExplorer : public vespalib::StateExplorer {
private:
- const vespalib::SyncableThreadExecutor* _shared;
- const vespalib::SyncableThreadExecutor* _match;
- const vespalib::SyncableThreadExecutor* _docsum;
- const vespalib::SyncableThreadExecutor* _flush;
- const vespalib::SyncableThreadExecutor* _proton;
- const vespalib::SyncableThreadExecutor* _warmup;
+ const vespalib::ThreadExecutor* _shared;
+ const vespalib::ThreadExecutor* _match;
+ const vespalib::ThreadExecutor* _docsum;
+ const vespalib::ThreadExecutor* _flush;
+ const vespalib::ThreadExecutor* _proton;
+ const vespalib::ThreadExecutor* _warmup;
public:
- ProtonThreadPoolsExplorer(const vespalib::SyncableThreadExecutor* shared,
- const vespalib::SyncableThreadExecutor* match,
- const vespalib::SyncableThreadExecutor* docsum,
- const vespalib::SyncableThreadExecutor* flush,
- const vespalib::SyncableThreadExecutor* proton,
- const vespalib::SyncableThreadExecutor* warmup);
+ ProtonThreadPoolsExplorer(const vespalib::ThreadExecutor* shared,
+ const vespalib::ThreadExecutor* match,
+ const vespalib::ThreadExecutor* docsum,
+ const vespalib::ThreadExecutor* flush,
+ const vespalib::ThreadExecutor* proton,
+ const vespalib::ThreadExecutor* warmup);
void get_state(const vespalib::slime::Inserter& inserter, bool full) const override;
};
diff --git a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h
index ea758443cd4..e6da0e958e8 100644
--- a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h
+++ b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h
@@ -45,12 +45,12 @@ public:
const FastAccessDocSubDB::Context _fastUpdCtx;
matching::QueryLimiter &_queryLimiter;
const vespalib::Clock &_clock;
- vespalib::SyncableThreadExecutor &_warmupExecutor;
+ vespalib::Executor &_warmupExecutor;
Context(const FastAccessDocSubDB::Context &fastUpdCtx,
matching::QueryLimiter &queryLimiter,
const vespalib::Clock &clock,
- vespalib::SyncableThreadExecutor &warmupExecutor)
+ vespalib:: Executor &warmupExecutor)
: _fastUpdCtx(fastUpdCtx),
_queryLimiter(queryLimiter),
_clock(clock),
@@ -70,7 +70,7 @@ private:
vespalib::eval::ConstantValueCache _constantValueCache;
matching::ConstantValueRepo _constantValueRepo;
SearchableDocSubDBConfigurer _configurer;
- vespalib::SyncableThreadExecutor &_warmupExecutor;
+ vespalib::Executor &_warmupExecutor;
std::shared_ptr<GidToLidChangeHandler> _realGidToLidChangeHandler;
DocumentDBFlushConfig _flushConfig;