diff options
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/server/proton.cpp | 8 | ||||
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/server/proton.h | 50 |
2 files changed, 28 insertions, 30 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.cpp b/searchcore/src/vespa/searchcore/proton/server/proton.cpp index afeaec5333f..26e1bc8b951 100644 --- a/searchcore/src/vespa/searchcore/proton/server/proton.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/proton.cpp @@ -60,6 +60,7 @@ using search::transactionlog::DomainStats; using vespa::config::search::core::ProtonConfig; using vespa::config::search::core::internal::InternalProtonType; using vespalib::compression::CompressionConfig; +using search::engine::MonitorReply; namespace proton { @@ -698,20 +699,17 @@ Proton::removeDocumentDB(const DocTypeName &docTypeName) } -Proton::MonitorReply::UP -Proton::ping(MonitorRequest::UP request, MonitorClient & client) +std::unique_ptr<MonitorReply> +Proton::ping(std::unique_ptr<MonitorRequest>, MonitorClient &) { - (void) client; auto reply = std::make_unique<MonitorReply>(); MonitorReply &ret = *reply; BootstrapConfig::SP configSnapshot = getActiveConfigSnapshot(); const ProtonConfig &protonConfig = configSnapshot->getProtonConfig(); - ret.partid = protonConfig.partition; ret.distribution_key = protonConfig.distributionkey; ret.timestamp = (_matchEngine->isOnline()) ? 42 : 0; ret.activeDocs = (_matchEngine->isOnline()) ? getNumActiveDocs() : 0; - ret.activeDocsRequested = request->reportActiveDocs; ret.is_blocking_writes = !_diskMemUsageSampler->writeFilter().acceptWriteOperation(); return reply; } diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.h b/searchcore/src/vespa/searchcore/proton/server/proton.h index 4396224fb01..0651e45bc49 100644 --- a/searchcore/src/vespa/searchcore/proton/server/proton.h +++ b/searchcore/src/vespa/searchcore/proton/server/proton.h @@ -78,31 +78,31 @@ private: void setClusterName(const vespalib::string &clusterName, const vespalib::string &baseDir); }; - const config::ConfigUri _configUri; - mutable std::shared_mutex _mutex; - std::unique_ptr<metrics::UpdateHook> _metricsHook; - std::unique_ptr<MetricsEngine> _metricsEngine; - ProtonFileHeaderContext _fileHeaderContext; - std::unique_ptr<TLS> _tls; - std::unique_ptr<DiskMemUsageSampler> _diskMemUsageSampler; - std::unique_ptr<PersistenceEngine> _persistenceEngine; - DocumentDBMap _documentDBMap; - std::unique_ptr<MatchEngine> _matchEngine; - std::unique_ptr<SummaryEngine> _summaryEngine; - std::unique_ptr<DocsumBySlime> _docsumBySlime; - MemoryFlushConfigUpdater::UP _memoryFlushConfigUpdater; - std::unique_ptr<FlushEngine> _flushEngine; + const config::ConfigUri _configUri; + mutable std::shared_mutex _mutex; + std::unique_ptr<metrics::UpdateHook> _metricsHook; + std::unique_ptr<MetricsEngine> _metricsEngine; + ProtonFileHeaderContext _fileHeaderContext; + std::unique_ptr<TLS> _tls; + std::unique_ptr<DiskMemUsageSampler> _diskMemUsageSampler; + std::unique_ptr<PersistenceEngine> _persistenceEngine; + DocumentDBMap _documentDBMap; + std::unique_ptr<MatchEngine> _matchEngine; + std::unique_ptr<SummaryEngine> _summaryEngine; + std::unique_ptr<DocsumBySlime> _docsumBySlime; + MemoryFlushConfigUpdater::UP _memoryFlushConfigUpdater; + std::unique_ptr<FlushEngine> _flushEngine; std::unique_ptr<PrepareRestartHandler> _prepareRestartHandler; - RPCHooks::UP _rpcHooks; - HealthAdapter _healthAdapter; - vespalib::GenericStateHandler _genericStateHandler; - vespalib::JsonHandlerRepo::Token::UP _customComponentBindToken; - vespalib::JsonHandlerRepo::Token::UP _customComponentRootToken; - std::unique_ptr<vespalib::StateServer> _stateServer; - vespalib::ThreadStackExecutor _executor; - std::unique_ptr<IProtonDiskLayout> _protonDiskLayout; - ProtonConfigurer _protonConfigurer; - ProtonConfigFetcher _protonConfigFetcher; + RPCHooks::UP _rpcHooks; + HealthAdapter _healthAdapter; + vespalib::GenericStateHandler _genericStateHandler; + vespalib::JsonHandlerRepo::Token::UP _customComponentBindToken; + vespalib::JsonHandlerRepo::Token::UP _customComponentRootToken; + std::unique_ptr<vespalib::StateServer> _stateServer; + vespalib::ThreadStackExecutor _executor; + std::unique_ptr<IProtonDiskLayout> _protonDiskLayout; + ProtonConfigurer _protonConfigurer; + ProtonConfigFetcher _protonConfigFetcher; std::unique_ptr<vespalib::ThreadStackExecutorBase> _warmupExecutor; std::shared_ptr<vespalib::ThreadStackExecutorBase> _sharedExecutor; vespalib::eval::CompileCache::ExecutorBinding::UP _compile_cache_executor_binding; @@ -128,7 +128,7 @@ private: void removeDocumentDB(const DocTypeName &docTypeName) override; void applyConfig(const BootstrapConfig::SP & configSnapshot) override; - MonitorReply::UP ping(MonitorRequest::UP request, MonitorClient &client) override; + std::unique_ptr<MonitorReply> ping(std::unique_ptr<MonitorRequest> request, MonitorClient &client) override; void waitForInitDone(); void waitForOnlineState(); |