diff options
author | Tor Egge <Tor.Egge@oath.com> | 2017-11-17 13:24:02 +0000 |
---|---|---|
committer | Tor Egge <Tor.Egge@oath.com> | 2017-11-17 14:00:06 +0000 |
commit | 4a6ed80ae2743e345565ea45f4f136028793dde9 (patch) | |
tree | 17f0a47c4df3a4bcfa80c63d8a2f210621737c0d | |
parent | daa5522477185f5e2e48f74b3f89dcc0cf365cce (diff) |
Remove DistributorBucketSpaceComponent.
18 files changed, 59 insertions, 100 deletions
diff --git a/storage/src/tests/distributor/bucketdbupdatertest.cpp b/storage/src/tests/distributor/bucketdbupdatertest.cpp index ec2f79c42e0..b9e33ea8d26 100644 --- a/storage/src/tests/distributor/bucketdbupdatertest.cpp +++ b/storage/src/tests/distributor/bucketdbupdatertest.cpp @@ -14,6 +14,7 @@ #include <vespa/document/test/make_bucket_space.h> #include <vespa/storage/distributor/simpleclusterinformation.h> #include <vespa/storage/distributor/distributor.h> +#include <vespa/storage/distributor/distributor_bucket_space.h> #include <vespa/vespalib/text/stringtokenizer.h> using namespace storage::api; diff --git a/storage/src/tests/distributor/distributortestutil.cpp b/storage/src/tests/distributor/distributortestutil.cpp index a0aa8e00070..6f5abc02512 100644 --- a/storage/src/tests/distributor/distributortestutil.cpp +++ b/storage/src/tests/distributor/distributortestutil.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 "distributortestutil.h" #include <vespa/storage/distributor/distributor.h> +#include <vespa/storage/distributor/distributor_bucket_space.h> #include <vespa/config-stor-distribution.h> #include <vespa/vespalib/text/stringtokenizer.h> #include <vespa/document/test/make_document_bucket.h> diff --git a/storage/src/tests/distributor/operationtargetresolvertest.cpp b/storage/src/tests/distributor/operationtargetresolvertest.cpp index 72f028a3ff8..1fea6e47656 100644 --- a/storage/src/tests/distributor/operationtargetresolvertest.cpp +++ b/storage/src/tests/distributor/operationtargetresolvertest.cpp @@ -11,6 +11,7 @@ #include <vespa/vdslib/distribution/idealnodecalculatorimpl.h> #include <vespa/vespalib/testkit/testapp.h> #include <vespa/storage/distributor/distributor_bucket_space_repo.h> +#include <vespa/storage/distributor/distributor_bucket_space.h> #include <vespa/storage/distributor/operationtargetresolverimpl.h> #include <vespa/storage/distributor/externaloperationhandler.h> #include <vespa/config/helper/configgetter.hpp> diff --git a/storage/src/tests/distributor/statecheckerstest.cpp b/storage/src/tests/distributor/statecheckerstest.cpp index 865d869761d..306f92cdd6a 100644 --- a/storage/src/tests/distributor/statecheckerstest.cpp +++ b/storage/src/tests/distributor/statecheckerstest.cpp @@ -14,6 +14,7 @@ #include <vespa/storage/distributor/operations/idealstate/splitoperation.h> #include <vespa/storage/distributor/maintenance/node_maintenance_stats_tracker.h> #include <vespa/storage/distributor/distributor_bucket_space_repo.h> +#include <vespa/storage/distributor/distributor_bucket_space.h> #include <vespa/storageapi/message/stat.h> #include <vespa/storage/storageutil/utils.h> #include <tests/distributor/distributortestutil.h> diff --git a/storage/src/tests/distributor/statoperationtest.cpp b/storage/src/tests/distributor/statoperationtest.cpp index 9ae8fc2fa4a..b010c5f6b79 100644 --- a/storage/src/tests/distributor/statoperationtest.cpp +++ b/storage/src/tests/distributor/statoperationtest.cpp @@ -8,6 +8,7 @@ #include <vespa/storage/distributor/operations/external/statbucketoperation.h> #include <vespa/storage/distributor/operations/external/statbucketlistoperation.h> #include <vespa/storage/distributor/distributor.h> +#include <vespa/storage/distributor/distributor_bucket_space.h> using document::test::makeDocumentBucket; diff --git a/storage/src/vespa/storage/distributor/CMakeLists.txt b/storage/src/vespa/storage/distributor/CMakeLists.txt index 3f3f6b8458a..8adbfcaf9da 100644 --- a/storage/src/vespa/storage/distributor/CMakeLists.txt +++ b/storage/src/vespa/storage/distributor/CMakeLists.txt @@ -8,7 +8,6 @@ vespa_add_library(storage_distributor bucketlistmerger.cpp clusterinformation.cpp distributor_bucket_space.cpp - distributor_bucket_space_component.cpp distributor_bucket_space_repo.cpp distributor.cpp distributor_host_info_reporter.cpp diff --git a/storage/src/vespa/storage/distributor/bucketdbupdater.cpp b/storage/src/vespa/storage/distributor/bucketdbupdater.cpp index 85d7af571e4..46fa0f72d76 100644 --- a/storage/src/vespa/storage/distributor/bucketdbupdater.cpp +++ b/storage/src/vespa/storage/distributor/bucketdbupdater.cpp @@ -3,6 +3,7 @@ #include "bucketdbupdater.h" #include "distributor.h" #include "distributor_bucket_space_repo.h" +#include "distributor_bucket_space.h" #include "simpleclusterinformation.h" #include <vespa/storage/common/bucketoperationlogger.h> #include <vespa/storageapi/message/persistence.h> @@ -21,13 +22,12 @@ namespace storage::distributor { BucketDBUpdater::BucketDBUpdater(Distributor& owner, DistributorBucketSpaceRepo &bucketSpaceRepo, - DistributorBucketSpace& bucketSpace, DistributorMessageSender& sender, DistributorComponentRegister& compReg) : framework::StatusReporter("bucketdb", "Bucket DB Updater"), - _bucketSpaceComponent(owner, bucketSpaceRepo, bucketSpace, compReg, "Bucket DB Updater"), + _distributorComponent(owner, bucketSpaceRepo, compReg, "Bucket DB Updater"), _sender(sender), - _transitionTimer(_bucketSpaceComponent.getClock()) + _transitionTimer(_distributorComponent.getClock()) { } @@ -64,7 +64,7 @@ BucketDBUpdater::checkOwnershipInPendingState(const document::Bucket& b) const { if (hasPendingClusterState()) { const lib::ClusterState& state(_pendingClusterState->getNewClusterState()); - if (!_bucketSpaceComponent.ownsBucketInState(state, b)) { + if (!_distributorComponent.ownsBucketInState(state, b)) { return BucketOwnership::createNotOwnedInState(state); } } @@ -77,7 +77,7 @@ BucketDBUpdater::sendRequestBucketInfo( const document::Bucket& bucket, const std::shared_ptr<MergeReplyGuard>& mergeReplyGuard) { - if (!_bucketSpaceComponent.storageNodeIsUp(node)) { + if (!_distributorComponent.storageNodeIsUp(node)) { return; } @@ -95,10 +95,10 @@ BucketDBUpdater::sendRequestBucketInfo( node); msg->setPriority(50); - msg->setAddress(_bucketSpaceComponent.nodeAddress(node)); + msg->setAddress(_distributorComponent.nodeAddress(node)); _sentMessages[msg->getMsgId()] = - BucketRequest(node, _bucketSpaceComponent.getUniqueTimestamp(), + BucketRequest(node, _distributorComponent.getUniqueTimestamp(), bucket, mergeReplyGuard); _sender.sendCommand(msg); } @@ -114,19 +114,19 @@ void BucketDBUpdater::removeSuperfluousBuckets( const lib::ClusterState& newState) { - for (auto &elem : _bucketSpaceComponent.getBucketSpaceRepo()) { + for (auto &elem : _distributorComponent.getBucketSpaceRepo()) { const auto &newDistribution(elem.second->getDistribution()); auto &bucketDb(elem.second->getBucketDatabase()); // Remove all buckets not belonging to this distributor, or // being on storage nodes that are no longer up. NodeRemover proc( - _bucketSpaceComponent.getClusterState(), + _distributorComponent.getClusterState(), newState, - _bucketSpaceComponent.getBucketIdFactory(), - _bucketSpaceComponent.getIndex(), + _distributorComponent.getBucketIdFactory(), + _distributorComponent.getIndex(), newDistribution, - _bucketSpaceComponent.getDistributor().getStorageNodeUpStates()); + _distributorComponent.getDistributor().getStorageNodeUpStates()); bucketDb.forEach(proc); for (const auto & entry :proc.getBucketsToRemove()) { @@ -142,14 +142,14 @@ BucketDBUpdater::ensureTransitionTimerStarted() // that will make transition times appear artificially low. if (!hasPendingClusterState()) { _transitionTimer = framework::MilliSecTimer( - _bucketSpaceComponent.getClock()); + _distributorComponent.getClock()); } } void BucketDBUpdater::completeTransitionTimer() { - _bucketSpaceComponent.getDistributor().getMetrics() + _distributorComponent.getDistributor().getMetrics() .stateTransitionTime.addValue(_transitionTimer.getElapsedTimeAsDouble()); } @@ -158,18 +158,18 @@ BucketDBUpdater::storageDistributionChanged() { ensureTransitionTimerStarted(); - removeSuperfluousBuckets(_bucketSpaceComponent.getClusterState()); + removeSuperfluousBuckets(_distributorComponent.getClusterState()); ClusterInformation::CSP clusterInfo(new SimpleClusterInformation( - _bucketSpaceComponent.getIndex(), - _bucketSpaceComponent.getClusterState(), - _bucketSpaceComponent.getDistributor().getStorageNodeUpStates())); + _distributorComponent.getIndex(), + _distributorComponent.getClusterState(), + _distributorComponent.getDistributor().getStorageNodeUpStates())); _pendingClusterState = PendingClusterState::createForDistributionChange( - _bucketSpaceComponent.getClock(), + _distributorComponent.getClock(), std::move(clusterInfo), _sender, - _bucketSpaceComponent.getBucketSpaceRepo(), - _bucketSpaceComponent.getUniqueTimestamp()); + _distributorComponent.getBucketSpaceRepo(), + _distributorComponent.getUniqueTimestamp()); _outdatedNodesMap = _pendingClusterState->getOutdatedNodesMap(); } @@ -179,7 +179,7 @@ BucketDBUpdater::replyToPreviousPendingClusterStateIfAny() if (_pendingClusterState.get() && _pendingClusterState->getCommand().get()) { - _bucketSpaceComponent.sendUp( + _distributorComponent.sendUp( std::make_shared<api::SetSystemStateReply>(*_pendingClusterState->getCommand())); } } @@ -192,7 +192,7 @@ BucketDBUpdater::onSetSystemState( "Received new cluster state %s", cmd->getSystemState().toString().c_str()); - lib::ClusterState oldState = _bucketSpaceComponent.getClusterState(); + lib::ClusterState oldState = _distributorComponent.getClusterState(); const lib::ClusterState& state = cmd->getSystemState(); if (state == oldState) { @@ -205,18 +205,18 @@ BucketDBUpdater::onSetSystemState( ClusterInformation::CSP clusterInfo( new SimpleClusterInformation( - _bucketSpaceComponent.getIndex(), - _bucketSpaceComponent.getClusterState(), - _bucketSpaceComponent.getDistributor() + _distributorComponent.getIndex(), + _distributorComponent.getClusterState(), + _distributorComponent.getDistributor() .getStorageNodeUpStates())); _pendingClusterState = PendingClusterState::createForClusterStateChange( - _bucketSpaceComponent.getClock(), + _distributorComponent.getClock(), std::move(clusterInfo), _sender, - _bucketSpaceComponent.getBucketSpaceRepo(), + _distributorComponent.getBucketSpaceRepo(), cmd, _outdatedNodesMap, - _bucketSpaceComponent.getUniqueTimestamp()); + _distributorComponent.getUniqueTimestamp()); _outdatedNodesMap = _pendingClusterState->getOutdatedNodesMap(); if (isPendingClusterStateCompleted()) { @@ -354,7 +354,7 @@ BucketDBUpdater::handleSingleBucketInfoFailure( req.targetNode, repl->getResult().toString().c_str()); if (req.bucket.getBucketId() != document::BucketId(0)) { - framework::MilliSecTime sendTime(_bucketSpaceComponent.getClock()); + framework::MilliSecTime sendTime(_distributorComponent.getClock()); sendTime += framework::MilliSecTime(100); _delayedRequests.emplace_back(sendTime, req); } @@ -367,7 +367,7 @@ BucketDBUpdater::resendDelayedMessages() _pendingClusterState->resendDelayedMessages(); } if (_delayedRequests.empty()) return; // Don't fetch time if not needed - framework::MilliSecTime currentTime(_bucketSpaceComponent.getClock()); + framework::MilliSecTime currentTime(_distributorComponent.getClock()); while (!_delayedRequests.empty() && currentTime >= _delayedRequests.front().first) { @@ -422,7 +422,7 @@ BucketDBUpdater::processSingleBucketInfoReply( BucketRequest req = iter->second; _sentMessages.erase(iter); - if (!_bucketSpaceComponent.storageNodeIsUp(req.targetNode)) { + if (!_distributorComponent.storageNodeIsUp(req.targetNode)) { // Ignore replies from nodes that are down. return true; } @@ -450,7 +450,7 @@ void BucketDBUpdater::findRelatedBucketsInDatabase(uint16_t node, const document::Bucket& bucket, BucketListMerger::BucketList& existing) { - auto &distributorBucketSpace(_bucketSpaceComponent.getBucketSpaceRepo().get(bucket.getBucketSpace())); + auto &distributorBucketSpace(_distributorComponent.getBucketSpaceRepo().get(bucket.getBucketSpace())); std::vector<BucketDatabase::Entry> entries; distributorBucketSpace.getBucketDatabase().getAll(bucket.getBucketId(), entries); @@ -464,12 +464,12 @@ BucketDBUpdater::updateDatabase(document::BucketSpace bucketSpace, uint16_t node { for (const document::BucketId & bucketId : merger.getRemovedEntries()) { document::Bucket bucket(bucketSpace, bucketId); - _bucketSpaceComponent.removeNodeFromDB(bucket, node); + _distributorComponent.removeNodeFromDB(bucket, node); } for (const BucketListMerger::BucketEntry& entry : merger.getAddedEntries()) { document::Bucket bucket(bucketSpace, entry.first); - _bucketSpaceComponent.updateBucketDatabase( + _distributorComponent.updateBucketDatabase( bucket, BucketCopy(merger.getTimestamp(), node, entry.second), DatabaseUpdate::CREATE_IF_NONEXISTING); @@ -489,11 +489,11 @@ BucketDBUpdater::processCompletedPendingClusterState() if (_pendingClusterState->getCommand().get()) { enableCurrentClusterStateInDistributor(); - _bucketSpaceComponent.getDistributor().getMessageSender().sendDown( + _distributorComponent.getDistributor().getMessageSender().sendDown( _pendingClusterState->getCommand()); addCurrentStateToClusterStateHistory(); } else { - _bucketSpaceComponent.getDistributor().notifyDistributionChangeEnabled(); + _distributorComponent.getDistributor().notifyDistributionChangeEnabled(); } _pendingClusterState.reset(); @@ -512,7 +512,7 @@ BucketDBUpdater::enableCurrentClusterStateInDistributor() "BucketDBUpdater finished processing state %s", state.toString().c_str()); - _bucketSpaceComponent.getDistributor().enableClusterState(state); + _distributorComponent.getDistributor().enableClusterState(state); } void @@ -563,7 +563,7 @@ BucketDBUpdater::reportXmlStatus(vespalib::xml::XmlOutputStream& xos, using namespace vespalib::xml; xos << XmlTag("bucketdb") << XmlTag("systemstate_active") - << XmlContent(_bucketSpaceComponent.getClusterState().toString()) + << XmlContent(_distributorComponent.getClusterState().toString()) << XmlEndTag(); if (_pendingClusterState) { xos << *_pendingClusterState; diff --git a/storage/src/vespa/storage/distributor/bucketdbupdater.h b/storage/src/vespa/storage/distributor/bucketdbupdater.h index c4b387c9a2f..a3c9804c2b4 100644 --- a/storage/src/vespa/storage/distributor/bucketdbupdater.h +++ b/storage/src/vespa/storage/distributor/bucketdbupdater.h @@ -6,7 +6,6 @@ #include "distributorcomponent.h" #include "distributormessagesender.h" #include "pendingclusterstate.h" -#include "distributor_bucket_space_component.h" #include "outdated_nodes_map.h" #include <vespa/document/bucket/bucket.h> #include <vespa/storageapi/messageapi/returncode.h> @@ -32,7 +31,6 @@ public: using OutdatedNodesMap = dbtransition::OutdatedNodesMap; BucketDBUpdater(Distributor& owner, DistributorBucketSpaceRepo &bucketSpaceRepo, - DistributorBucketSpace& bucketSpace, DistributorMessageSender& sender, DistributorComponentRegister& compReg); ~BucketDBUpdater(); @@ -52,7 +50,7 @@ public: vespalib::string getReportContentType(const framework::HttpUrlPath&) const override; bool reportStatus(std::ostream&, const framework::HttpUrlPath&) const override; void print(std::ostream& out, bool verbose, const std::string& indent) const; - DistributorComponent& getDistributorComponent() { return _bucketSpaceComponent; } + DistributorComponent& getDistributorComponent() { return _distributorComponent; } /** * Returns whether the current PendingClusterState indicates that there has @@ -66,7 +64,7 @@ public: } private: - DistributorBucketSpaceComponent _bucketSpaceComponent; + DistributorComponent _distributorComponent; class MergeReplyGuard { public: MergeReplyGuard(BucketDBUpdater& updater, const std::shared_ptr<api::MergeBucketReply>& reply) diff --git a/storage/src/vespa/storage/distributor/distributor.cpp b/storage/src/vespa/storage/distributor/distributor.cpp index 665f2edd569..07d411b21a5 100644 --- a/storage/src/vespa/storage/distributor/distributor.cpp +++ b/storage/src/vespa/storage/distributor/distributor.cpp @@ -72,12 +72,12 @@ Distributor::Distributor(DistributorComponentRegister& compReg, _operationOwner(*this, _component.getClock()), _maintenanceOperationOwner(*this, _component.getClock()), _pendingMessageTracker(compReg), - _bucketDBUpdater(*this, *_bucketSpaceRepo, getDefaultBucketSpace(), *this, compReg), + _bucketDBUpdater(*this, *_bucketSpaceRepo, *this, compReg), _distributorStatusDelegate(compReg, *this, *this), _bucketDBStatusDelegate(compReg, *this, _bucketDBUpdater), - _idealStateManager(*this, *_bucketSpaceRepo, getDefaultBucketSpace(), compReg, + _idealStateManager(*this, *_bucketSpaceRepo, compReg, manageActiveBucketCopies), - _externalOperationHandler(*this, *_bucketSpaceRepo, getDefaultBucketSpace(), + _externalOperationHandler(*this, *_bucketSpaceRepo, _idealStateManager, compReg), _threadPool(threadPool), _initializingIsUp(true), diff --git a/storage/src/vespa/storage/distributor/distributor_bucket_space_component.cpp b/storage/src/vespa/storage/distributor/distributor_bucket_space_component.cpp deleted file mode 100644 index 4616179ae82..00000000000 --- a/storage/src/vespa/storage/distributor/distributor_bucket_space_component.cpp +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - -#include "distributor_bucket_space_component.h" - -namespace storage::distributor { - -DistributorBucketSpaceComponent::DistributorBucketSpaceComponent( - DistributorInterface& distributor, - DistributorBucketSpaceRepo &bucketSpaceRepo, - DistributorBucketSpace& bucketSpace, - DistributorComponentRegister& compReg, - const std::string& name) - : DistributorComponent(distributor, bucketSpaceRepo, compReg, name), - _bucketSpace(bucketSpace) -{ -} - -} diff --git a/storage/src/vespa/storage/distributor/distributor_bucket_space_component.h b/storage/src/vespa/storage/distributor/distributor_bucket_space_component.h deleted file mode 100644 index fa6f2412c5e..00000000000 --- a/storage/src/vespa/storage/distributor/distributor_bucket_space_component.h +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#pragma once - -#include "distributorcomponent.h" -#include "distributor_bucket_space.h" - -namespace storage { -namespace distributor { - -/** - * Component bound to a specific bucket space, with utility operations to - * operate on buckets in this space. - */ -class DistributorBucketSpaceComponent : public DistributorComponent { - DistributorBucketSpace& _bucketSpace; -public: - DistributorBucketSpaceComponent(DistributorInterface& distributor, - DistributorBucketSpaceRepo &bucketSpaceRepo, - DistributorBucketSpace& bucketSpace, - DistributorComponentRegister& compReg, - const std::string& name); -}; - -} -} diff --git a/storage/src/vespa/storage/distributor/externaloperationhandler.cpp b/storage/src/vespa/storage/distributor/externaloperationhandler.cpp index 77a86a3756d..902726fff41 100644 --- a/storage/src/vespa/storage/distributor/externaloperationhandler.cpp +++ b/storage/src/vespa/storage/distributor/externaloperationhandler.cpp @@ -20,6 +20,7 @@ #include <vespa/storageapi/message/batch.h> #include <vespa/storageapi/message/stat.h> #include "distributor_bucket_space_repo.h" +#include "distributor_bucket_space.h" #include <vespa/log/log.h> LOG_SETUP(".distributor.manager"); @@ -29,10 +30,9 @@ namespace storage::distributor { ExternalOperationHandler::ExternalOperationHandler( Distributor& owner, DistributorBucketSpaceRepo& bucketSpaceRepo, - DistributorBucketSpace& bucketSpace, const MaintenanceOperationGenerator& gen, DistributorComponentRegister& compReg) - : DistributorBucketSpaceComponent(owner, bucketSpaceRepo, bucketSpace, compReg, "External operation handler"), + : DistributorComponent(owner, bucketSpaceRepo, compReg, "External operation handler"), _operationGenerator(gen), _rejectFeedBeforeTimeReached() // At epoch { } diff --git a/storage/src/vespa/storage/distributor/externaloperationhandler.h b/storage/src/vespa/storage/distributor/externaloperationhandler.h index 763796767cf..c405b63aa81 100644 --- a/storage/src/vespa/storage/distributor/externaloperationhandler.h +++ b/storage/src/vespa/storage/distributor/externaloperationhandler.h @@ -6,7 +6,6 @@ #include <vespa/document/bucket/bucketidfactory.h> #include <vespa/vdslib/state/clusterstate.h> #include <vespa/storage/distributor/distributorcomponent.h> -#include <vespa/storage/distributor/distributor_bucket_space_component.h> #include <vespa/storageapi/messageapi/messagehandler.h> #include <chrono> @@ -20,7 +19,7 @@ namespace distributor { class Distributor; class MaintenanceOperationGenerator; -class ExternalOperationHandler : public DistributorBucketSpaceComponent, +class ExternalOperationHandler : public DistributorComponent, public api::MessageHandler { public: @@ -39,7 +38,6 @@ public: ExternalOperationHandler(Distributor& owner, DistributorBucketSpaceRepo& bucketSpaceRepo, - DistributorBucketSpace& bucketSpace, const MaintenanceOperationGenerator&, DistributorComponentRegister& compReg); diff --git a/storage/src/vespa/storage/distributor/idealstatemanager.cpp b/storage/src/vespa/storage/distributor/idealstatemanager.cpp index a33d8376e4d..4ceeb387341 100644 --- a/storage/src/vespa/storage/distributor/idealstatemanager.cpp +++ b/storage/src/vespa/storage/distributor/idealstatemanager.cpp @@ -11,6 +11,7 @@ #include <vespa/storage/common/bucketmessages.h> #include <vespa/vespalib/stllike/hash_map.hpp> #include "distributor_bucket_space_repo.h" +#include "distributor_bucket_space.h" #include <vespa/log/log.h> LOG_SETUP(".distributor.operation.queue"); @@ -25,12 +26,11 @@ namespace distributor { IdealStateManager::IdealStateManager( Distributor& owner, DistributorBucketSpaceRepo& bucketSpaceRepo, - DistributorBucketSpace& bucketSpace, DistributorComponentRegister& compReg, bool manageActiveBucketCopies) : HtmlStatusReporter("idealstateman", "Ideal state manager"), _metrics(new IdealStateMetricSet), - _distributorComponent(owner, bucketSpaceRepo, bucketSpace, compReg, "Ideal state manager"), + _distributorComponent(owner, bucketSpaceRepo, compReg, "Ideal state manager"), _bucketSpaceRepo(bucketSpaceRepo) { _distributorComponent.registerStatusPage(*this); diff --git a/storage/src/vespa/storage/distributor/idealstatemanager.h b/storage/src/vespa/storage/distributor/idealstatemanager.h index ef2bb983aee..b9607b35d28 100644 --- a/storage/src/vespa/storage/distributor/idealstatemanager.h +++ b/storage/src/vespa/storage/distributor/idealstatemanager.h @@ -4,7 +4,7 @@ #include <deque> #include <map> #include <set> -#include <vespa/storage/distributor/distributor_bucket_space_component.h> +#include <vespa/storage/distributor/distributorcomponent.h> #include <vespa/storage/distributor/statechecker.h> #include <vespa/storage/distributor/maintenance/maintenanceprioritygenerator.h> #include <vespa/storage/distributor/maintenance/maintenanceoperationgenerator.h> @@ -41,7 +41,6 @@ public: IdealStateManager(Distributor& owner, DistributorBucketSpaceRepo& bucketSpaceRepo, - DistributorBucketSpace& bucketSpace, DistributorComponentRegister& compReg, bool manageActiveBucketCopies); @@ -114,7 +113,7 @@ private: std::vector<StateChecker::SP> _stateCheckers; SplitBucketStateChecker* _splitBucketStateChecker; - DistributorBucketSpaceComponent _distributorComponent; + DistributorComponent _distributorComponent; DistributorBucketSpaceRepo &_bucketSpaceRepo; std::vector<IdealStateOperation::SP> generateOperationsForBucket( diff --git a/storage/src/vespa/storage/distributor/operations/external/visitoroperation.cpp b/storage/src/vespa/storage/distributor/operations/external/visitoroperation.cpp index a4cebcc7c3e..9f92d313f1f 100644 --- a/storage/src/vespa/storage/distributor/operations/external/visitoroperation.cpp +++ b/storage/src/vespa/storage/distributor/operations/external/visitoroperation.cpp @@ -3,6 +3,7 @@ #include "visitoroperation.h" #include <vespa/storage/storageserver/storagemetricsset.h> #include <vespa/storage/distributor/distributor.h> +#include <vespa/storage/distributor/distributor_bucket_space.h> #include <vespa/storage/distributor/bucketownership.h> #include <vespa/storage/distributor/operations/external/visitororder.h> #include <vespa/storage/distributor/visitormetricsset.h> diff --git a/storage/src/vespa/storage/distributor/operations/idealstate/removebucketoperation.cpp b/storage/src/vespa/storage/distributor/operations/idealstate/removebucketoperation.cpp index dd7155d0f38..9a94a5a62ad 100644 --- a/storage/src/vespa/storage/distributor/operations/idealstate/removebucketoperation.cpp +++ b/storage/src/vespa/storage/distributor/operations/idealstate/removebucketoperation.cpp @@ -3,6 +3,7 @@ #include "removebucketoperation.h" #include <vespa/storage/distributor/idealstatemanager.h> #include <vespa/storage/distributor/distributor.h> +#include <vespa/storage/distributor/distributor_bucket_space.h> #include <vespa/log/log.h> diff --git a/storage/src/vespa/storage/distributor/pendingclusterstate.cpp b/storage/src/vespa/storage/distributor/pendingclusterstate.cpp index daaf723274d..71684db5527 100644 --- a/storage/src/vespa/storage/distributor/pendingclusterstate.cpp +++ b/storage/src/vespa/storage/distributor/pendingclusterstate.cpp @@ -4,6 +4,7 @@ #include "pending_bucket_space_db_transition.h" #include "bucketdbupdater.h" #include "distributor_bucket_space_repo.h" +#include "distributor_bucket_space.h" #include <vespa/storageframework/defaultimplementation/clock/realclock.h> #include <vespa/storage/common/bucketoperationlogger.h> #include <vespa/vespalib/util/xmlstream.hpp> |