aboutsummaryrefslogtreecommitdiffstats
path: root/storageserver/src/vespa/storageserver/app/distributorprocess.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'storageserver/src/vespa/storageserver/app/distributorprocess.cpp')
-rw-r--r--storageserver/src/vespa/storageserver/app/distributorprocess.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/storageserver/src/vespa/storageserver/app/distributorprocess.cpp b/storageserver/src/vespa/storageserver/app/distributorprocess.cpp
index 987b3b613d8..b56a4e1884b 100644
--- a/storageserver/src/vespa/storageserver/app/distributorprocess.cpp
+++ b/storageserver/src/vespa/storageserver/app/distributorprocess.cpp
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "distributorprocess.h"
#include <vespa/config/helper/configgetter.hpp>
@@ -61,9 +61,6 @@ DistributorProcess::setupConfig(vespalib::duration subscribeTimeout)
using vespa::config::content::core::StorDistributormanagerConfig;
using vespa::config::content::core::StorVisitordispatcherConfig;
- auto distr_cfg = config::ConfigGetter<StorDistributormanagerConfig>::getConfig(
- _configUri.getConfigId(), _configUri.getContext(), subscribeTimeout);
- _num_distributor_stripes = adjusted_num_distributor_stripes(distr_cfg->numDistributorStripes);
_distributorConfigHandler = _configSubscriber.subscribe<StorDistributormanagerConfig>(_configUri.getConfigId(), subscribeTimeout);
_visitDispatcherConfigHandler = _configSubscriber.subscribe<StorVisitordispatcherConfig>(_configUri.getConfigId(), subscribeTimeout);
Process::setupConfig(subscribeTimeout);
@@ -99,8 +96,19 @@ DistributorProcess::configUpdated()
void
DistributorProcess::createNode()
{
- _node = std::make_unique<DistributorNode>(_configUri, _context, *this, _num_distributor_stripes, StorageLink::UP(), std::move(_storage_chain_builder));
- _node->handleConfigChange(*_distributorConfigHandler->getConfig());
+ auto distributor_config = _distributorConfigHandler->getConfig();
+ _num_distributor_stripes = adjusted_num_distributor_stripes(distributor_config->numDistributorStripes);
+ // 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();
+
+ _node = std::make_unique<DistributorNode>(_configUri, _context, std::move(bc), *this, _num_distributor_stripes,
+ StorageLink::UP(), std::move(_storage_chain_builder));
+ _node->handleConfigChange(*distributor_config);
_node->handleConfigChange(*_visitDispatcherConfigHandler->getConfig());
}