From 2b4569480234c579e7b278414ab1ef06729209c6 Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Sat, 26 Jun 2021 20:51:09 +0000 Subject: GC unused 'partitionid' and various other members of MonitorReply that are long gone. --- .../src/vespa/searchcore/proton/server/proton.cpp | 8 ++-- .../src/vespa/searchcore/proton/server/proton.h | 50 +++++++++++----------- 2 files changed, 28 insertions(+), 30 deletions(-) (limited to 'searchcore') 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 +Proton::ping(std::unique_ptr, MonitorClient &) { - (void) client; auto reply = std::make_unique(); 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 _metricsHook; - std::unique_ptr _metricsEngine; - ProtonFileHeaderContext _fileHeaderContext; - std::unique_ptr _tls; - std::unique_ptr _diskMemUsageSampler; - std::unique_ptr _persistenceEngine; - DocumentDBMap _documentDBMap; - std::unique_ptr _matchEngine; - std::unique_ptr _summaryEngine; - std::unique_ptr _docsumBySlime; - MemoryFlushConfigUpdater::UP _memoryFlushConfigUpdater; - std::unique_ptr _flushEngine; + const config::ConfigUri _configUri; + mutable std::shared_mutex _mutex; + std::unique_ptr _metricsHook; + std::unique_ptr _metricsEngine; + ProtonFileHeaderContext _fileHeaderContext; + std::unique_ptr _tls; + std::unique_ptr _diskMemUsageSampler; + std::unique_ptr _persistenceEngine; + DocumentDBMap _documentDBMap; + std::unique_ptr _matchEngine; + std::unique_ptr _summaryEngine; + std::unique_ptr _docsumBySlime; + MemoryFlushConfigUpdater::UP _memoryFlushConfigUpdater; + std::unique_ptr _flushEngine; std::unique_ptr _prepareRestartHandler; - RPCHooks::UP _rpcHooks; - HealthAdapter _healthAdapter; - vespalib::GenericStateHandler _genericStateHandler; - vespalib::JsonHandlerRepo::Token::UP _customComponentBindToken; - vespalib::JsonHandlerRepo::Token::UP _customComponentRootToken; - std::unique_ptr _stateServer; - vespalib::ThreadStackExecutor _executor; - std::unique_ptr _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 _stateServer; + vespalib::ThreadStackExecutor _executor; + std::unique_ptr _protonDiskLayout; + ProtonConfigurer _protonConfigurer; + ProtonConfigFetcher _protonConfigFetcher; std::unique_ptr _warmupExecutor; std::shared_ptr _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 ping(std::unique_ptr request, MonitorClient &client) override; void waitForInitDone(); void waitForOnlineState(); -- cgit v1.2.3