diff options
11 files changed, 106 insertions, 76 deletions
diff --git a/storage/src/tests/common/testhelper.h b/storage/src/tests/common/testhelper.h index bfc5c7679e1..1f83e938409 100644 --- a/storage/src/tests/common/testhelper.h +++ b/storage/src/tests/common/testhelper.h @@ -1,5 +1,6 @@ // Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once +#include <vespa/config/helper/configgetter.h> #include <vespa/messagebus/testlib/slobrok.h> #include <vespa/vdstestlib/config/dirconfig.h> #include <fstream> @@ -21,6 +22,11 @@ std::string getRootFolder(vdstestlib::DirConfig & dc); void addSlobrokConfig(vdstestlib::DirConfig& dc, const mbus::Slobrok& slobrok); +template <typename ConfigT> +std::unique_ptr<ConfigT> config_from(const ::config::ConfigUri& cfg_uri) { + return ::config::ConfigGetter<ConfigT>::getConfig(cfg_uri.getConfigId(), cfg_uri.getContext()); +} + // Class used to print start and end of test. Enable debug when you want to see // which test creates what output or where we get stuck struct TestName { diff --git a/storage/src/tests/storageserver/changedbucketownershiphandlertest.cpp b/storage/src/tests/storageserver/changedbucketownershiphandlertest.cpp index 639b3231028..50977b5ec8b 100644 --- a/storage/src/tests/storageserver/changedbucketownershiphandlertest.cpp +++ b/storage/src/tests/storageserver/changedbucketownershiphandlertest.cpp @@ -3,6 +3,7 @@ #include <tests/common/teststorageapp.h> #include <tests/common/testhelper.h> #include <tests/common/dummystoragelink.h> +#include <vespa/config/helper/configgetter.hpp> #include <vespa/document/base/testdocman.h> #include <vespa/storage/bucketdb/storbucketdb.h> #include <vespa/storage/persistence/messages.h> @@ -124,11 +125,12 @@ ChangedBucketOwnershipHandlerTest::insertBuckets(uint32_t numBuckets, void ChangedBucketOwnershipHandlerTest::SetUp() { + using vespa::config::content::PersistenceConfig; vdstestlib::DirConfig config(getStandardConfig(true)); _app.reset(new TestServiceLayerApp); _top.reset(new DummyStorageLink); - _handler = new ChangedBucketOwnershipHandler(config::ConfigUri(config.getConfigId()), + _handler = new ChangedBucketOwnershipHandler(*config_from<PersistenceConfig>(config::ConfigUri(config.getConfigId())), _app->getComponentRegister()); _top->push_back(std::unique_ptr<StorageLink>(_handler)); _bottom = new DummyStorageLink; @@ -139,7 +141,7 @@ ChangedBucketOwnershipHandlerTest::SetUp() auto pconfig = std::make_unique<vespa::config::content::PersistenceConfigBuilder>(); pconfig->abortOutdatedMutatingIdealStateOps = true; pconfig->abortOutdatedMutatingExternalLoadOps = true; - _handler->configure(std::move(pconfig)); + _handler->on_configure(*pconfig); } namespace { @@ -466,7 +468,7 @@ TEST_F(ChangedBucketOwnershipHandlerTest, abort_outdated_remove_location) { TEST_F(ChangedBucketOwnershipHandlerTest, ideal_state_aborts_are_configurable) { auto config = std::make_unique<vespa::config::content::PersistenceConfigBuilder>(); config->abortOutdatedMutatingIdealStateOps = false; - _handler->configure(std::move(config)); + _handler->on_configure(*config); // Should not abort operation, even when ownership has changed. expectChangeAbortsMessage<api::CreateBucketCommand>(false, getBucketToAbort()); } @@ -508,7 +510,7 @@ TEST_F(ChangedBucketOwnershipHandlerTest, external_load_op_abort_updates_metric) TEST_F(ChangedBucketOwnershipHandlerTest, external_load_op_aborts_are_configurable) { auto config = std::make_unique<vespa::config::content::PersistenceConfigBuilder>(); config->abortOutdatedMutatingExternalLoadOps = false; - _handler->configure(std::move(config)); + _handler->on_configure(*config); // Should not abort operation, even when ownership has changed. document::DocumentId docId("id:foo:testdoctype1::bar"); expectChangeAbortsMessage<api::RemoveCommand>( diff --git a/storage/src/tests/storageserver/communicationmanagertest.cpp b/storage/src/tests/storageserver/communicationmanagertest.cpp index 70b8c40722c..04322562d08 100644 --- a/storage/src/tests/storageserver/communicationmanagertest.cpp +++ b/storage/src/tests/storageserver/communicationmanagertest.cpp @@ -29,14 +29,6 @@ vespalib::string _storage("storage"); using CommunicationManagerConfig = vespa::config::content::core::StorCommunicationmanagerConfig; -namespace { - -std::unique_ptr<CommunicationManagerConfig> config_from(const config::ConfigUri& cfg_uri) { - return config::ConfigGetter<CommunicationManagerConfig>::getConfig(cfg_uri.getConfigId(), cfg_uri.getContext()); -} - -} - struct CommunicationManagerTest : Test { static constexpr uint32_t MESSAGE_WAIT_TIME_SEC = 60; @@ -88,8 +80,10 @@ TEST_F(CommunicationManagerTest, simple) { auto dist_cfg_uri = config::ConfigUri(distConfig.getConfigId()); auto stor_cfg_uri = config::ConfigUri(storConfig.getConfigId()); - CommunicationManager distributor(distNode.getComponentRegister(), dist_cfg_uri, *config_from(dist_cfg_uri)); - CommunicationManager storage(storNode.getComponentRegister(), stor_cfg_uri, *config_from(stor_cfg_uri)); + CommunicationManager distributor(distNode.getComponentRegister(), dist_cfg_uri, + *config_from<CommunicationManagerConfig>(dist_cfg_uri)); + CommunicationManager storage(storNode.getComponentRegister(), stor_cfg_uri, + *config_from<CommunicationManagerConfig>(stor_cfg_uri)); auto* distributorLink = new DummyStorageLink(); auto* storageLink = new DummyStorageLink(); distributor.push_back(std::unique_ptr<StorageLink>(distributorLink)); @@ -146,7 +140,8 @@ CommunicationManagerTest::doTestConfigPropagation(bool isContentNode) } auto cfg_uri = config::ConfigUri(config.getConfigId()); - CommunicationManager commMgr(node->getComponentRegister(), cfg_uri, *config_from(cfg_uri)); + CommunicationManager commMgr(node->getComponentRegister(), cfg_uri, + *config_from<CommunicationManagerConfig>(cfg_uri)); auto* storageLink = new DummyStorageLink(); commMgr.push_back(std::unique_ptr<StorageLink>(storageLink)); commMgr.open(); @@ -191,7 +186,8 @@ TEST_F(CommunicationManagerTest, commands_are_dequeued_in_fifo_order) { TestServiceLayerApp storNode(storConfig.getConfigId()); auto cfg_uri = config::ConfigUri(storConfig.getConfigId()); - CommunicationManager storage(storNode.getComponentRegister(), cfg_uri, *config_from(cfg_uri)); + CommunicationManager storage(storNode.getComponentRegister(), cfg_uri, + *config_from<CommunicationManagerConfig>(cfg_uri)); auto* storageLink = new DummyStorageLink(); storage.push_back(std::unique_ptr<StorageLink>(storageLink)); storage.open(); @@ -224,7 +220,8 @@ TEST_F(CommunicationManagerTest, replies_are_dequeued_in_fifo_order) { TestServiceLayerApp storNode(storConfig.getConfigId()); auto cfg_uri = config::ConfigUri(storConfig.getConfigId()); - CommunicationManager storage(storNode.getComponentRegister(), cfg_uri, *config_from(cfg_uri)); + CommunicationManager storage(storNode.getComponentRegister(), cfg_uri, + *config_from<CommunicationManagerConfig>(cfg_uri)); auto* storageLink = new DummyStorageLink(); storage.push_back(std::unique_ptr<StorageLink>(storageLink)); storage.open(); @@ -265,7 +262,8 @@ struct CommunicationManagerFixture { node = std::make_unique<TestServiceLayerApp>(stor_config.getConfigId()); auto cfg_uri = config::ConfigUri(stor_config.getConfigId()); - comm_mgr = std::make_unique<CommunicationManager>(node->getComponentRegister(), cfg_uri, *config_from(cfg_uri)); + comm_mgr = std::make_unique<CommunicationManager>(node->getComponentRegister(), cfg_uri, + *config_from<CommunicationManagerConfig>(cfg_uri)); bottom_link = new DummyStorageLink(); comm_mgr->push_back(std::unique_ptr<StorageLink>(bottom_link)); comm_mgr->open(); diff --git a/storage/src/tests/storageserver/mergethrottlertest.cpp b/storage/src/tests/storageserver/mergethrottlertest.cpp index 990a552780b..7a7f2551c2d 100644 --- a/storage/src/tests/storageserver/mergethrottlertest.cpp +++ b/storage/src/tests/storageserver/mergethrottlertest.cpp @@ -124,10 +124,6 @@ makeSystemStateCmd(const std::string& state) return std::make_shared<api::SetSystemStateCommand>(lib::ClusterState(state)); } -std::unique_ptr<StorServerConfig> config_from(const ::config::ConfigUri& cfg_uri) { - return ::config::ConfigGetter<StorServerConfig>::getConfig(cfg_uri.getConfigId(), cfg_uri.getContext()); -} - } // anon ns struct MergeThrottlerTest : Test { @@ -176,7 +172,7 @@ MergeThrottlerTest::SetUp() { vdstestlib::DirConfig dir_config(getStandardConfig(true)); auto cfg_uri = ::config::ConfigUri(dir_config.getConfigId()); - auto config = config_from(cfg_uri); + auto config = config_from<StorServerConfig>(cfg_uri); for (int i = 0; i < _storageNodeCount; ++i) { auto server = std::make_unique<TestServiceLayerApp>(NodeIndex(i)); diff --git a/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.cpp b/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.cpp index 34040bb12c0..25829f3d391 100644 --- a/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.cpp +++ b/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.cpp @@ -22,12 +22,11 @@ LOG_SETUP(".bucketownershiphandler"); namespace storage { ChangedBucketOwnershipHandler::ChangedBucketOwnershipHandler( - const config::ConfigUri& configUri, + const PersistenceConfig& bootstrap_config, ServiceLayerComponentRegister& compReg) : StorageLink("Changed bucket ownership handler"), _component(compReg, "changedbucketownershiphandler"), _metrics(), - _configFetcher(std::make_unique<config::ConfigFetcher>(configUri.getContext())), _state_sync_executor(1), // single thread for sequential task execution _stateLock(), _currentState(), // Not set yet, so ownership will not be valid @@ -37,25 +36,23 @@ ChangedBucketOwnershipHandler::ChangedBucketOwnershipHandler( _abortMutatingIdealStateOps(false), _abortMutatingExternalLoadOps(false) { - _configFetcher->subscribe<vespa::config::content::PersistenceConfig>(configUri.getConfigId(), this); - _configFetcher->start(); + on_configure(bootstrap_config); _component.registerMetric(_metrics); } ChangedBucketOwnershipHandler::~ChangedBucketOwnershipHandler() = default; void -ChangedBucketOwnershipHandler::configure( - std::unique_ptr<vespa::config::content::PersistenceConfig> config) +ChangedBucketOwnershipHandler::on_configure(const vespa::config::content::PersistenceConfig& config) { _abortQueuedAndPendingOnStateChange.store( - config->abortOperationsWithChangedBucketOwnership, + config.abortOperationsWithChangedBucketOwnership, std::memory_order_relaxed); _abortMutatingIdealStateOps.store( - config->abortOutdatedMutatingIdealStateOps, + config.abortOutdatedMutatingIdealStateOps, std::memory_order_relaxed); _abortMutatingExternalLoadOps.store( - config->abortOutdatedMutatingExternalLoadOps, + config.abortOutdatedMutatingExternalLoadOps, std::memory_order_relaxed); } diff --git a/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.h b/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.h index 3e20eb507f6..801534385f7 100644 --- a/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.h +++ b/storage/src/vespa/storage/storageserver/changedbucketownershiphandler.h @@ -56,10 +56,7 @@ namespace lib { * - RemoveCommand * - RevertCommand */ -class ChangedBucketOwnershipHandler - : public StorageLink, - private config::IFetcherCallback<vespa::config::content::PersistenceConfig> -{ +class ChangedBucketOwnershipHandler : public StorageLink { public: class Metrics : public metrics::MetricSet { public: @@ -115,12 +112,11 @@ public: private: class ClusterStateSyncAndApplyTask; - using ConfigFetcherUP = std::unique_ptr<config::ConfigFetcher>; + using PersistenceConfig = vespa::config::content::PersistenceConfig; using ClusterStateBundleCSP = std::shared_ptr<const lib::ClusterStateBundle>; ServiceLayerComponent _component; Metrics _metrics; - ConfigFetcherUP _configFetcher; vespalib::ThreadStackExecutor _state_sync_executor; mutable std::mutex _stateLock; ClusterStateBundleCSP _currentState; @@ -185,7 +181,7 @@ private: bool enabledExternalLoadAborting() const; public: - ChangedBucketOwnershipHandler(const config::ConfigUri& configUri, + ChangedBucketOwnershipHandler(const PersistenceConfig& bootstrap_config, ServiceLayerComponentRegister& compReg); ~ChangedBucketOwnershipHandler() override; @@ -194,7 +190,7 @@ public: bool onInternalReply(const std::shared_ptr<api::InternalReply>& reply) override; void onClose() override; - void configure(std::unique_ptr<vespa::config::content::PersistenceConfig>) override; + void on_configure(const PersistenceConfig&); /** * We want to ensure distribution config changes are thread safe wrt. our diff --git a/storage/src/vespa/storage/storageserver/distributornode.cpp b/storage/src/vespa/storage/storageserver/distributornode.cpp index ef7579f8085..10ee8023621 100644 --- a/storage/src/vespa/storage/storageserver/distributornode.cpp +++ b/storage/src/vespa/storage/storageserver/distributornode.cpp @@ -84,8 +84,6 @@ void DistributorNode::createChain(IStorageChainBuilder &builder) { DistributorComponentRegister& dcr(_context.getComponentRegister()); - // TODO: All components in this chain should use a common thread instead of - // each having its own configfetcher. StorageLink::UP chain; if (_retrievedCommunicationManager) { builder.add(std::move(_retrievedCommunicationManager)); diff --git a/storage/src/vespa/storage/storageserver/servicelayernode.cpp b/storage/src/vespa/storage/storageserver/servicelayernode.cpp index b09621335a7..7bfd5ebe3dd 100644 --- a/storage/src/vespa/storage/storageserver/servicelayernode.cpp +++ b/storage/src/vespa/storage/storageserver/servicelayernode.cpp @@ -24,18 +24,27 @@ LOG_SETUP(".node.servicelayer"); namespace storage { +ServiceLayerNode::ServiceLayerBootstrapConfigs::ServiceLayerBootstrapConfigs() = default; +ServiceLayerNode::ServiceLayerBootstrapConfigs::~ServiceLayerBootstrapConfigs() = default; +ServiceLayerNode::ServiceLayerBootstrapConfigs::ServiceLayerBootstrapConfigs(ServiceLayerBootstrapConfigs&&) noexcept = default; +ServiceLayerNode::ServiceLayerBootstrapConfigs& +ServiceLayerNode::ServiceLayerBootstrapConfigs::operator=(ServiceLayerBootstrapConfigs&&) noexcept = default; + ServiceLayerNode::ServiceLayerNode(const config::ConfigUri & configUri, ServiceLayerNodeContext& context, - BootstrapConfigs bootstrap_configs, + ServiceLayerBootstrapConfigs bootstrap_configs, ApplicationGenerationFetcher& generationFetcher, spi::PersistenceProvider& persistenceProvider, const VisitorFactory::Map& externalVisitors) - : StorageNode(configUri, context, std::move(bootstrap_configs), generationFetcher, std::make_unique<HostInfo>()), + : StorageNode(configUri, context, std::move(bootstrap_configs.storage_bootstrap_configs), + generationFetcher, std::make_unique<HostInfo>()), _context(context), _persistenceProvider(persistenceProvider), _externalVisitors(externalVisitors), + _persistence_bootstrap_config(std::move(bootstrap_configs.persistence_cfg)), _bouncer(nullptr), _bucket_manager(nullptr), + _changed_bucket_ownership_handler(nullptr), _fileStorManager(nullptr), _merge_throttler(nullptr), _init_has_been_called(false) @@ -162,7 +171,9 @@ ServiceLayerNode::createChain(IStorageChainBuilder &builder) auto merge_throttler_up = std::make_unique<MergeThrottler>(server_config(), compReg); _merge_throttler = merge_throttler_up.get(); builder.add(std::move(merge_throttler_up)); - builder.add(std::make_unique<ChangedBucketOwnershipHandler>(_configUri, compReg)); + auto bucket_ownership_handler = std::make_unique<ChangedBucketOwnershipHandler>(*_persistence_bootstrap_config, compReg); + _changed_bucket_ownership_handler = bucket_ownership_handler.get(); + builder.add(std::move(bucket_ownership_handler)); auto bucket_manager = std::make_unique<BucketManager>(_configUri, _context.getComponentRegister()); _bucket_manager = bucket_manager.get(); builder.add(std::move(bucket_manager)); @@ -181,6 +192,9 @@ ServiceLayerNode::createChain(IStorageChainBuilder &builder) // the storage link chain is closed prior to destruction. auto error_listener = std::make_shared<ServiceLayerErrorListener>(*_component, *_merge_throttler); _fileStorManager->error_wrapper().register_error_listener(std::move(error_listener)); + + // Purge config no longer needed + _persistence_bootstrap_config.reset(); } void @@ -190,6 +204,13 @@ ServiceLayerNode::on_configure(const StorServerConfig& config) _merge_throttler->on_configure(config); } +void +ServiceLayerNode::on_configure(const PersistenceConfig& config) +{ + assert(_changed_bucket_ownership_handler); + _changed_bucket_ownership_handler->on_configure(config); +} + ResumeGuard ServiceLayerNode::pause() { diff --git a/storage/src/vespa/storage/storageserver/servicelayernode.h b/storage/src/vespa/storage/storageserver/servicelayernode.h index 3e95b9c6d3b..f13c54a16f1 100644 --- a/storage/src/vespa/storage/storageserver/servicelayernode.h +++ b/storage/src/vespa/storage/storageserver/servicelayernode.h @@ -6,6 +6,7 @@ #include "servicelayernodecontext.h" #include "storagenode.h" #include "vespa/vespalib/util/jsonstream.h" +#include <vespa/config-persistence.h> #include <vespa/storage/visiting/visitormessagesessionfactory.h> #include <vespa/storage/common/visitorfactory.h> #include <vespa/storage/common/nodestateupdater.h> @@ -16,6 +17,7 @@ namespace spi { struct PersistenceProvider; } class Bouncer; class BucketManager; +class ChangedBucketOwnershipHandler; class FileStorManager; class MergeThrottler; @@ -25,22 +27,36 @@ class ServiceLayerNode private NodeStateReporter { - ServiceLayerNodeContext& _context; - spi::PersistenceProvider& _persistenceProvider; - VisitorFactory::Map _externalVisitors; - - Bouncer* _bouncer; - BucketManager* _bucket_manager; - FileStorManager* _fileStorManager; - MergeThrottler* _merge_throttler; - bool _init_has_been_called; +public: + using PersistenceConfig = vespa::config::content::PersistenceConfig; +private: + ServiceLayerNodeContext& _context; + spi::PersistenceProvider& _persistenceProvider; + VisitorFactory::Map _externalVisitors; + std::unique_ptr<PersistenceConfig> _persistence_bootstrap_config; + Bouncer* _bouncer; + BucketManager* _bucket_manager; + ChangedBucketOwnershipHandler* _changed_bucket_ownership_handler; + FileStorManager* _fileStorManager; + MergeThrottler* _merge_throttler; + bool _init_has_been_called; public: using UP = std::unique_ptr<ServiceLayerNode>; + struct ServiceLayerBootstrapConfigs { + BootstrapConfigs storage_bootstrap_configs; + std::unique_ptr<PersistenceConfig> persistence_cfg; + + ServiceLayerBootstrapConfigs(); + ~ServiceLayerBootstrapConfigs(); + ServiceLayerBootstrapConfigs(ServiceLayerBootstrapConfigs&&) noexcept; + ServiceLayerBootstrapConfigs& operator=(ServiceLayerBootstrapConfigs&&) noexcept; + }; + ServiceLayerNode(const config::ConfigUri & configUri, ServiceLayerNodeContext& context, - BootstrapConfigs bootstrap_configs, + ServiceLayerBootstrapConfigs bootstrap_configs, ApplicationGenerationFetcher& generationFetcher, spi::PersistenceProvider& persistenceProvider, const VisitorFactory::Map& externalVisitors); @@ -51,6 +67,7 @@ public: void init(); void on_configure(const StorServerConfig& config); + void on_configure(const PersistenceConfig& config); const lib::NodeType& getNodeType() const override { return lib::NodeType::STORAGE; } diff --git a/storageserver/src/vespa/storageserver/app/servicelayerprocess.cpp b/storageserver/src/vespa/storageserver/app/servicelayerprocess.cpp index 9b835cee05e..0c23bb1a409 100644 --- a/storageserver/src/vespa/storageserver/app/servicelayerprocess.cpp +++ b/storageserver/src/vespa/storageserver/app/servicelayerprocess.cpp @@ -34,6 +34,7 @@ bucket_db_options_from_config(const config::ConfigUri& config_uri) { ServiceLayerProcess::ServiceLayerProcess(const config::ConfigUri& configUri) : Process(configUri), _externalVisitors(), + _persistence_cfg_handle(), _node(), _storage_chain_builder(), _context(std::make_unique<framework::defaultimplementation::RealClock>(), @@ -53,6 +54,7 @@ ServiceLayerProcess::shutdown() void ServiceLayerProcess::setupConfig(vespalib::duration subscribe_timeout) { + _persistence_cfg_handle = _configSubscriber.subscribe<PersistenceConfig>(_configUri.getConfigId(), subscribe_timeout); // We reuse the StorServerConfig subscription from the parent Process Process::setupConfig(subscribe_timeout); } @@ -64,6 +66,9 @@ ServiceLayerProcess::updateConfig() if (_server_cfg_handle->isChanged()) { _node->on_configure(*_server_cfg_handle->getConfig()); } + if (_persistence_cfg_handle->isChanged()) { + _node->on_configure(*_persistence_cfg_handle->getConfig()); + } } bool @@ -77,15 +82,19 @@ ServiceLayerProcess::createNode() { add_external_visitors(); setupProvider(); - // TODO dedupe, consolidate + StorageNode::BootstrapConfigs bc; bc.bucket_spaces_cfg = _bucket_spaces_cfg_handle->getConfig(); - bc.bouncer_cfg = _bouncer_cfg_handle->getConfig(); - bc.comm_mgr_cfg = _comm_mgr_cfg_handle->getConfig(); - bc.distribution_cfg = _distribution_cfg_handle->getConfig(); - bc.server_cfg = _server_cfg_handle->getConfig(); + bc.bouncer_cfg = _bouncer_cfg_handle->getConfig(); + bc.comm_mgr_cfg = _comm_mgr_cfg_handle->getConfig(); + bc.distribution_cfg = _distribution_cfg_handle->getConfig(); + bc.server_cfg = _server_cfg_handle->getConfig(); + + ServiceLayerNode::ServiceLayerBootstrapConfigs sbc; + sbc.storage_bootstrap_configs = std::move(bc); + sbc.persistence_cfg = _persistence_cfg_handle->getConfig(); - _node = std::make_unique<ServiceLayerNode>(_configUri, _context, std::move(bc), *this, getProvider(), _externalVisitors); + _node = std::make_unique<ServiceLayerNode>(_configUri, _context, std::move(sbc), *this, getProvider(), _externalVisitors); if (_storage_chain_builder) { _node->set_storage_chain_builder(std::move(_storage_chain_builder)); } diff --git a/storageserver/src/vespa/storageserver/app/servicelayerprocess.h b/storageserver/src/vespa/storageserver/app/servicelayerprocess.h index 7e981748d1a..2579b3df199 100644 --- a/storageserver/src/vespa/storageserver/app/servicelayerprocess.h +++ b/storageserver/src/vespa/storageserver/app/servicelayerprocess.h @@ -1,22 +1,8 @@ // Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -/** - * \class storage::ServiceLayerProcess - * - * \brief A process running a service layer. - */ -/** - * \class storage::MemFileServiceLayerProcess - * - * \brief A process running a service layer with memfile persistence provider. - */ -/** - * \class storage::RpcServiceLayerProcess - * - * \brief A process running a service layer with RPC persistence provider. - */ #pragma once #include "process.h" +#include <vespa/config-persistence.h> #include <vespa/storage/storageserver/servicelayernodecontext.h> #include <vespa/storage/common/visitorfactory.h> @@ -33,6 +19,10 @@ class ServiceLayerProcess : public Process { protected: VisitorFactory::Map _externalVisitors; private: + using PersistenceConfig = vespa::config::content::PersistenceConfig; + + std::unique_ptr<config::ConfigHandle<PersistenceConfig>> _persistence_cfg_handle; + std::unique_ptr<ServiceLayerNode> _node; std::unique_ptr<IStorageChainBuilder> _storage_chain_builder; |