diff options
author | Geir Storli <geirst@verizonmedia.com> | 2021-03-22 12:35:33 +0000 |
---|---|---|
committer | Geir Storli <geirst@verizonmedia.com> | 2021-03-22 12:35:33 +0000 |
commit | 1dfa0e9d42d47f375c8b6a4db457cba862e6b20b (patch) | |
tree | 2602120a31d3a93989cdede980d3c4586ecd6931 /storage | |
parent | 62fcb6289c392fd711b7666058fc3b674c259e53 (diff) |
Rename DistributorInterface -> DistributorStripeInterface.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/src/vespa/storage/distributor/bucketdbupdater.cpp | 2 | ||||
-rw-r--r-- | storage/src/vespa/storage/distributor/bucketdbupdater.h | 10 | ||||
-rw-r--r-- | storage/src/vespa/storage/distributor/distributor.cpp | 4 | ||||
-rw-r--r-- | storage/src/vespa/storage/distributor/distributor.h | 4 | ||||
-rw-r--r-- | storage/src/vespa/storage/distributor/distributor_stripe.cpp | 4 | ||||
-rw-r--r-- | storage/src/vespa/storage/distributor/distributor_stripe.h | 7 | ||||
-rw-r--r-- | storage/src/vespa/storage/distributor/distributor_stripe_interface.h (renamed from storage/src/vespa/storage/distributor/distributorinterface.h) | 5 | ||||
-rw-r--r-- | storage/src/vespa/storage/distributor/distributorcomponent.cpp | 2 | ||||
-rw-r--r-- | storage/src/vespa/storage/distributor/distributorcomponent.h | 10 | ||||
-rw-r--r-- | storage/src/vespa/storage/distributor/idealstatemanager.cpp | 2 | ||||
-rw-r--r-- | storage/src/vespa/storage/distributor/idealstatemanager.h | 4 |
11 files changed, 30 insertions, 24 deletions
diff --git a/storage/src/vespa/storage/distributor/bucketdbupdater.cpp b/storage/src/vespa/storage/distributor/bucketdbupdater.cpp index 2a76ed5a26a..6735ea1e533 100644 --- a/storage/src/vespa/storage/distributor/bucketdbupdater.cpp +++ b/storage/src/vespa/storage/distributor/bucketdbupdater.cpp @@ -24,7 +24,7 @@ using document::BucketSpace; namespace storage::distributor { -BucketDBUpdater::BucketDBUpdater(DistributorInterface& owner, +BucketDBUpdater::BucketDBUpdater(DistributorStripeInterface& owner, DistributorBucketSpaceRepo& bucketSpaceRepo, DistributorBucketSpaceRepo& readOnlyBucketSpaceRepo, DistributorMessageSender& sender, diff --git a/storage/src/vespa/storage/distributor/bucketdbupdater.h b/storage/src/vespa/storage/distributor/bucketdbupdater.h index d80d823a7d1..13a6235a4e5 100644 --- a/storage/src/vespa/storage/distributor/bucketdbupdater.h +++ b/storage/src/vespa/storage/distributor/bucketdbupdater.h @@ -26,7 +26,7 @@ class XmlAttribute; namespace storage::distributor { -class DistributorInterface; +class DistributorStripeInterface; class BucketSpaceDistributionContext; class BucketDBUpdater : public framework::StatusReporter, @@ -34,7 +34,7 @@ class BucketDBUpdater : public framework::StatusReporter, { public: using OutdatedNodesMap = dbtransition::OutdatedNodesMap; - BucketDBUpdater(DistributorInterface& owner, + BucketDBUpdater(DistributorStripeInterface& owner, DistributorBucketSpaceRepo& bucketSpaceRepo, DistributorBucketSpaceRepo& readOnlyBucketSpaceRepo, DistributorMessageSender& sender, @@ -81,7 +81,7 @@ public: private: class MergeReplyGuard { public: - MergeReplyGuard(DistributorInterface& distributor_interface, const std::shared_ptr<api::MergeBucketReply>& reply) noexcept + MergeReplyGuard(DistributorStripeInterface& distributor_interface, const std::shared_ptr<api::MergeBucketReply>& reply) noexcept : _distributor_interface(distributor_interface), _reply(reply) {} ~MergeReplyGuard(); @@ -90,7 +90,7 @@ private: // than send it down void resetReply() { _reply.reset(); } private: - DistributorInterface& _distributor_interface; + DistributorStripeInterface& _distributor_interface; std::shared_ptr<api::MergeBucketReply> _reply; }; @@ -242,7 +242,7 @@ private: DistributorComponent _distributorComponent; const DistributorNodeContext& _node_ctx; DistributorOperationContext& _op_ctx; - DistributorInterface& _distributor_interface; + DistributorStripeInterface& _distributor_interface; std::deque<std::pair<framework::MilliSecTime, BucketRequest> > _delayedRequests; std::map<uint64_t, BucketRequest> _sentMessages; std::unique_ptr<PendingClusterState> _pendingClusterState; diff --git a/storage/src/vespa/storage/distributor/distributor.cpp b/storage/src/vespa/storage/distributor/distributor.cpp index 665478e68a2..eac7219a24d 100644 --- a/storage/src/vespa/storage/distributor/distributor.cpp +++ b/storage/src/vespa/storage/distributor/distributor.cpp @@ -31,7 +31,7 @@ namespace storage::distributor { /* TODO STRIPE * - need a DistributorComponent per stripe * - or better, remove entirely! - * - probably also DistributorInterface since it's used to send + * - probably also DistributorStripeInterface since it's used to send * - metrics aggregation * - host info aggregation..!! * - handled if Distributor getMinReplica etc delegates to stripes? @@ -46,7 +46,7 @@ Distributor::Distributor(DistributorComponentRegister& compReg, HostInfo& hostInfoReporterRegistrar, ChainedMessageSender* messageSender) : StorageLink("distributor"), - DistributorInterface(), + DistributorStripeInterface(), framework::StatusReporter("distributor", "Distributor"), _metrics(std::make_shared<DistributorMetricSet>()), _messageSender(messageSender), diff --git a/storage/src/vespa/storage/distributor/distributor.h b/storage/src/vespa/storage/distributor/distributor.h index c758dbd75e2..82e1ceb16f6 100644 --- a/storage/src/vespa/storage/distributor/distributor.h +++ b/storage/src/vespa/storage/distributor/distributor.h @@ -5,7 +5,7 @@ #include "bucket_spaces_stats_provider.h" #include "bucketdbupdater.h" #include "distributor_host_info_reporter.h" -#include "distributorinterface.h" +#include "distributor_stripe_interface.h" #include "externaloperationhandler.h" #include "idealstatemanager.h" #include "min_replica_provider.h" @@ -42,7 +42,7 @@ class SimpleMaintenanceScanner; class ThrottlingOperationStarter; class Distributor : public StorageLink, - public DistributorInterface, + public DistributorStripeInterface, public StatusDelegator, public framework::StatusReporter, public framework::TickingThread, diff --git a/storage/src/vespa/storage/distributor/distributor_stripe.cpp b/storage/src/vespa/storage/distributor/distributor_stripe.cpp index 4671e5ec9ca..2b020c43c4a 100644 --- a/storage/src/vespa/storage/distributor/distributor_stripe.cpp +++ b/storage/src/vespa/storage/distributor/distributor_stripe.cpp @@ -30,7 +30,7 @@ namespace storage::distributor { /* TODO STRIPE * - need a DistributorComponent per stripe * - or better, remove entirely! - * - probably also DistributorInterface since it's used to send + * - probably also DistributorStripeInterface since it's used to send * - metrics aggregation */ DistributorStripe::DistributorStripe(DistributorComponentRegister& compReg, @@ -41,7 +41,7 @@ DistributorStripe::DistributorStripe(DistributorComponentRegister& compReg, bool manageActiveBucketCopies, ChainedMessageSender& messageSender) : StorageLink("distributor"), - DistributorInterface(), + DistributorStripeInterface(), framework::StatusReporter("distributor", "Distributor"), _clusterStateBundle(lib::ClusterState()), _bucketSpaceRepo(std::make_unique<DistributorBucketSpaceRepo>(node_identity.node_index())), diff --git a/storage/src/vespa/storage/distributor/distributor_stripe.h b/storage/src/vespa/storage/distributor/distributor_stripe.h index dbf899a6de2..ac2193877a5 100644 --- a/storage/src/vespa/storage/distributor/distributor_stripe.h +++ b/storage/src/vespa/storage/distributor/distributor_stripe.h @@ -5,7 +5,7 @@ #include "bucket_spaces_stats_provider.h" #include "bucketdbupdater.h" #include "distributor_host_info_reporter.h" -#include "distributorinterface.h" +#include "distributor_stripe_interface.h" #include "externaloperationhandler.h" #include "idealstatemanager.h" #include "min_replica_provider.h" @@ -40,9 +40,12 @@ class OwnershipTransferSafeTimePointCalculator; class SimpleMaintenanceScanner; class ThrottlingOperationStarter; +/** + * TODO STRIPE add class comment. + */ class DistributorStripe final : public StorageLink, // TODO decouple - public DistributorInterface, + public DistributorStripeInterface, public StatusDelegator, public framework::StatusReporter, public framework::TickingThread, diff --git a/storage/src/vespa/storage/distributor/distributorinterface.h b/storage/src/vespa/storage/distributor/distributor_stripe_interface.h index bf4ff9c4c99..d83acfabffc 100644 --- a/storage/src/vespa/storage/distributor/distributorinterface.h +++ b/storage/src/vespa/storage/distributor/distributor_stripe_interface.h @@ -18,7 +18,10 @@ namespace storage::distributor { class DistributorMetricSet; class PendingMessageTracker; -class DistributorInterface : public DistributorMessageSender +/** + * TODO STRIPE add class comment. + */ +class DistributorStripeInterface : public DistributorMessageSender { public: virtual PendingMessageTracker& getPendingMessageTracker() = 0; diff --git a/storage/src/vespa/storage/distributor/distributorcomponent.cpp b/storage/src/vespa/storage/distributor/distributorcomponent.cpp index e5fe3c6c43c..4c170791fa2 100644 --- a/storage/src/vespa/storage/distributor/distributorcomponent.cpp +++ b/storage/src/vespa/storage/distributor/distributorcomponent.cpp @@ -15,7 +15,7 @@ using document::BucketSpace; namespace storage::distributor { DistributorComponent::DistributorComponent( - DistributorInterface& distributor, + DistributorStripeInterface& distributor, DistributorBucketSpaceRepo& bucketSpaceRepo, DistributorBucketSpaceRepo& readOnlyBucketSpaceRepo, DistributorComponentRegister& compReg, diff --git a/storage/src/vespa/storage/distributor/distributorcomponent.h b/storage/src/vespa/storage/distributor/distributorcomponent.h index 6a3620cbcf7..b4aa27a781b 100644 --- a/storage/src/vespa/storage/distributor/distributorcomponent.h +++ b/storage/src/vespa/storage/distributor/distributorcomponent.h @@ -3,7 +3,7 @@ #include "distributor_node_context.h" #include "distributor_operation_context.h" -#include "distributorinterface.h" +#include "distributor_stripe_interface.h" #include "document_selection_parser.h" #include "operationowner.h" #include "statechecker.h" @@ -33,7 +33,7 @@ class DistributorComponent : public storage::DistributorComponent, public DocumentSelectionParser { public: - DistributorComponent(DistributorInterface& distributor, + DistributorComponent(DistributorStripeInterface& distributor, DistributorBucketSpaceRepo& bucketSpaceRepo, DistributorBucketSpaceRepo& readOnlyBucketSpaceRepo, DistributorComponentRegister& compReg, @@ -115,9 +115,9 @@ public: void sendDown(const api::StorageMessage::SP&); void sendUp(const api::StorageMessage::SP&); - DistributorInterface& getDistributor() { return _distributor; } + DistributorStripeInterface& getDistributor() { return _distributor; } - const DistributorInterface& getDistributor() const { + const DistributorStripeInterface& getDistributor() const { return _distributor; } @@ -216,7 +216,7 @@ private: const lib::ClusterState& s, const document::Bucket& bucket, const std::vector<BucketCopy>& candidates) const; - DistributorInterface& _distributor; + DistributorStripeInterface& _distributor; protected: diff --git a/storage/src/vespa/storage/distributor/idealstatemanager.cpp b/storage/src/vespa/storage/distributor/idealstatemanager.cpp index c92f6a3dfcf..a7ea1f9400c 100644 --- a/storage/src/vespa/storage/distributor/idealstatemanager.cpp +++ b/storage/src/vespa/storage/distributor/idealstatemanager.cpp @@ -25,7 +25,7 @@ namespace storage { namespace distributor { IdealStateManager::IdealStateManager( - DistributorInterface& owner, + DistributorStripeInterface& owner, DistributorBucketSpaceRepo& bucketSpaceRepo, DistributorBucketSpaceRepo& readOnlyBucketSpaceRepo, DistributorComponentRegister& compReg, diff --git a/storage/src/vespa/storage/distributor/idealstatemanager.h b/storage/src/vespa/storage/distributor/idealstatemanager.h index 19f88334889..f4c9a009e7d 100644 --- a/storage/src/vespa/storage/distributor/idealstatemanager.h +++ b/storage/src/vespa/storage/distributor/idealstatemanager.h @@ -11,7 +11,7 @@ namespace storage::distributor { class IdealStateMetricSet; class IdealStateOperation; -class DistributorInterface; +class DistributorStripeInterface; class SplitBucketStateChecker; /** @@ -34,7 +34,7 @@ class IdealStateManager : public framework::HtmlStatusReporter, { public: - IdealStateManager(DistributorInterface& owner, + IdealStateManager(DistributorStripeInterface& owner, DistributorBucketSpaceRepo& bucketSpaceRepo, DistributorBucketSpaceRepo& readOnlyBucketSpaceRepo, DistributorComponentRegister& compReg, |