diff options
Diffstat (limited to 'storageserver')
-rw-r--r-- | storageserver/src/vespa/storageserver/app/servicelayerprocess.cpp | 6 | ||||
-rw-r--r-- | storageserver/src/vespa/storageserver/app/servicelayerprocess.h | 11 |
2 files changed, 13 insertions, 4 deletions
diff --git a/storageserver/src/vespa/storageserver/app/servicelayerprocess.cpp b/storageserver/src/vespa/storageserver/app/servicelayerprocess.cpp index f43ec574806..bb284bfc108 100644 --- a/storageserver/src/vespa/storageserver/app/servicelayerprocess.cpp +++ b/storageserver/src/vespa/storageserver/app/servicelayerprocess.cpp @@ -36,6 +36,7 @@ ServiceLayerProcess::ServiceLayerProcess(const config::ConfigUri& configUri) _externalVisitors(), _persistence_cfg_handle(), _visitor_cfg_handle(), + _filestor_cfg_handle(), _node(), _storage_chain_builder(), _context(std::make_unique<framework::defaultimplementation::RealClock>(), @@ -57,6 +58,7 @@ ServiceLayerProcess::setupConfig(vespalib::duration subscribe_timeout) { _persistence_cfg_handle = _configSubscriber.subscribe<PersistenceConfig>(_configUri.getConfigId(), subscribe_timeout); _visitor_cfg_handle = _configSubscriber.subscribe<StorVisitorConfig>(_configUri.getConfigId(), subscribe_timeout); + _filestor_cfg_handle = _configSubscriber.subscribe<StorFilestorConfig>(_configUri.getConfigId(), subscribe_timeout); // We reuse the StorServerConfig subscription from the parent Process Process::setupConfig(subscribe_timeout); } @@ -74,6 +76,9 @@ ServiceLayerProcess::updateConfig() if (_visitor_cfg_handle->isChanged()) { _node->on_configure(*_visitor_cfg_handle->getConfig()); } + if (_filestor_cfg_handle->isChanged()) { + _node->on_configure(*_filestor_cfg_handle->getConfig()); + } } bool @@ -99,6 +104,7 @@ ServiceLayerProcess::createNode() sbc.storage_bootstrap_configs = std::move(bc); sbc.persistence_cfg = _persistence_cfg_handle->getConfig(); sbc.visitor_cfg = _visitor_cfg_handle->getConfig(); + sbc.filestor_cfg = _filestor_cfg_handle->getConfig(); _node = std::make_unique<ServiceLayerNode>(_configUri, _context, std::move(sbc), *this, getProvider(), _externalVisitors); if (_storage_chain_builder) { diff --git a/storageserver/src/vespa/storageserver/app/servicelayerprocess.h b/storageserver/src/vespa/storageserver/app/servicelayerprocess.h index d91c66be266..dcc56f373c4 100644 --- a/storageserver/src/vespa/storageserver/app/servicelayerprocess.h +++ b/storageserver/src/vespa/storageserver/app/servicelayerprocess.h @@ -3,6 +3,7 @@ #include "process.h" #include <vespa/config-persistence.h> +#include <vespa/config-stor-filestor.h> #include <vespa/storage/common/visitorfactory.h> #include <vespa/storage/storageserver/servicelayernodecontext.h> #include <vespa/storage/visiting/config-stor-visitor.h> @@ -20,11 +21,13 @@ class ServiceLayerProcess : public Process { protected: VisitorFactory::Map _externalVisitors; private: - using PersistenceConfig = vespa::config::content::PersistenceConfig; - using StorVisitorConfig = vespa::config::content::core::StorVisitorConfig; + using PersistenceConfig = vespa::config::content::PersistenceConfig; + using StorVisitorConfig = vespa::config::content::core::StorVisitorConfig; + using StorFilestorConfig = vespa::config::content::StorFilestorConfig; - std::unique_ptr<config::ConfigHandle<PersistenceConfig>> _persistence_cfg_handle; - std::unique_ptr<config::ConfigHandle<StorVisitorConfig>> _visitor_cfg_handle; + std::unique_ptr<config::ConfigHandle<PersistenceConfig>> _persistence_cfg_handle; + std::unique_ptr<config::ConfigHandle<StorVisitorConfig>> _visitor_cfg_handle; + std::unique_ptr<config::ConfigHandle<StorFilestorConfig>> _filestor_cfg_handle; std::unique_ptr<ServiceLayerNode> _node; std::unique_ptr<IStorageChainBuilder> _storage_chain_builder; |