diff options
Diffstat (limited to 'storageserver')
-rw-r--r-- | storageserver/src/vespa/storageserver/app/distributorprocess.cpp | 17 | ||||
-rw-r--r-- | storageserver/src/vespa/storageserver/app/process.cpp | 11 |
2 files changed, 11 insertions, 17 deletions
diff --git a/storageserver/src/vespa/storageserver/app/distributorprocess.cpp b/storageserver/src/vespa/storageserver/app/distributorprocess.cpp index 05b61944a33..6ef391fa56a 100644 --- a/storageserver/src/vespa/storageserver/app/distributorprocess.cpp +++ b/storageserver/src/vespa/storageserver/app/distributorprocess.cpp @@ -1,6 +1,7 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/storageserver/app/distributorprocess.h> +#include "distributorprocess.h" +#include <vespa/storage/common/storagelink.h> #include <vespa/config/helper/configgetter.hpp> #include <vespa/log/log.h> @@ -49,12 +50,10 @@ DistributorProcess::updateConfig() { Process::updateConfig(); if (_distributorConfigHandler->isChanged()) { - _node->handleConfigChange( - *_distributorConfigHandler->getConfig()); + _node->handleConfigChange(*_distributorConfigHandler->getConfig()); } if (_visitDispatcherConfigHandler->isChanged()) { - _node->handleConfigChange( - *_visitDispatcherConfigHandler->getConfig()); + _node->handleConfigChange(*_visitDispatcherConfigHandler->getConfig()); } } @@ -76,11 +75,9 @@ DistributorProcess::configUpdated() void DistributorProcess::createNode() { - _node.reset(new DistributorNode(_configUri, _context, *this, _activeFlag)); - _node->handleConfigChange( - *_distributorConfigHandler->getConfig()); - _node->handleConfigChange( - *_visitDispatcherConfigHandler->getConfig()); + _node.reset(new DistributorNode(_configUri, _context, *this, _activeFlag, StorageLink::UP())); + _node->handleConfigChange(*_distributorConfigHandler->getConfig()); + _node->handleConfigChange(*_visitDispatcherConfigHandler->getConfig()); } } // storage diff --git a/storageserver/src/vespa/storageserver/app/process.cpp b/storageserver/src/vespa/storageserver/app/process.cpp index ea8ae4da485..a604490ba85 100644 --- a/storageserver/src/vespa/storageserver/app/process.cpp +++ b/storageserver/src/vespa/storageserver/app/process.cpp @@ -2,6 +2,7 @@ #include "process.h" #include <vespa/storage/storageserver/storagenode.h> +#include <vespa/storage/storageserver/storagenodecontext.h> #include <vespa/vespalib/util/exceptions.h> #include <vespa/log/log.h> @@ -19,11 +20,9 @@ Process::setupConfig(uint64_t subscribeTimeout) { _documentHandler = _configSubscriber.subscribe<document::DocumenttypesConfig>(_configUri.getConfigId(), subscribeTimeout); if (!_configSubscriber.nextConfig()) { - throw vespalib::TimeoutException( - "Could not subscribe to document config within timeout"); + throw vespalib::TimeoutException("Could not subscribe to document config within timeout"); } - _repos.push_back(document::DocumentTypeRepo::SP( - new document::DocumentTypeRepo(*_documentHandler->getConfig()))); + _repos.push_back(std::make_shared<document::DocumentTypeRepo>(*_documentHandler->getConfig())); getContext().getComponentRegister().setDocumentTypeRepo(_repos.back()); } @@ -42,9 +41,7 @@ void Process::updateConfig() { if (_documentHandler->isChanged()) { - _repos.push_back(document::DocumentTypeRepo::SP( - new document::DocumentTypeRepo( - *_documentHandler->getConfig()))); + _repos.push_back(std::make_shared<document::DocumentTypeRepo>(*_documentHandler->getConfig())); getNode().setNewDocumentRepo(_repos.back()); } } |