diff options
author | Geir Storli <geirst@verizonmedia.com> | 2021-04-27 09:11:10 +0000 |
---|---|---|
committer | Geir Storli <geirst@verizonmedia.com> | 2021-04-27 09:11:10 +0000 |
commit | 1cc5ceecb27d8f6df6e3dcc8cb3ac327bc2407a9 (patch) | |
tree | a085687469e78bf69facdd6836db0fa3323d8c9d /storage/src | |
parent | e2e062e2f1115ef201d802e0997d03677fbbd1c3 (diff) |
Rename DistributorOperationContext to DistributorStripeOperationContext.
Diffstat (limited to 'storage/src')
24 files changed, 38 insertions, 38 deletions
diff --git a/storage/src/tests/distributor/distributortestutil.cpp b/storage/src/tests/distributor/distributortestutil.cpp index 43870dd2c3e..bdd953b6206 100644 --- a/storage/src/tests/distributor/distributortestutil.cpp +++ b/storage/src/tests/distributor/distributortestutil.cpp @@ -357,7 +357,7 @@ DistributorTestUtil::distributor_component() { return _distributor->distributor_component(); } -storage::distributor::DistributorOperationContext& +storage::distributor::DistributorStripeOperationContext& DistributorTestUtil::operation_context() { return _distributor->distributor_component(); } diff --git a/storage/src/tests/distributor/distributortestutil.h b/storage/src/tests/distributor/distributortestutil.h index ddf153a1406..b845456e873 100644 --- a/storage/src/tests/distributor/distributortestutil.h +++ b/storage/src/tests/distributor/distributortestutil.h @@ -21,7 +21,7 @@ class StripeBucketDBUpdater; class Distributor; class DistributorBucketSpace; class DistributorBucketSpaceRepo; -class DistributorOperationContext; +class DistributorStripeOperationContext; class DistributorStripe; class DistributorStripeComponent; class ExternalOperationHandler; @@ -116,7 +116,7 @@ public: IdealStateManager& getIdealStateManager(); ExternalOperationHandler& getExternalOperationHandler(); storage::distributor::DistributorStripeComponent& distributor_component(); - storage::distributor::DistributorOperationContext& operation_context(); + storage::distributor::DistributorStripeOperationContext& operation_context(); Distributor& getDistributor() { return *_distributor; diff --git a/storage/src/vespa/storage/distributor/bucketdbupdater.h b/storage/src/vespa/storage/distributor/bucketdbupdater.h index b990f094e9c..09621c64bf8 100644 --- a/storage/src/vespa/storage/distributor/bucketdbupdater.h +++ b/storage/src/vespa/storage/distributor/bucketdbupdater.h @@ -61,7 +61,7 @@ public: void print(std::ostream& out, bool verbose, const std::string& indent) const; const DistributorNodeContext& node_context() const { return _node_ctx; } - DistributorOperationContext& operation_context() { return _op_ctx; } + DistributorStripeOperationContext& operation_context() { return _op_ctx; } void set_stale_reads_enabled(bool enabled) noexcept { _stale_reads_enabled.store(enabled, std::memory_order_relaxed); @@ -170,7 +170,7 @@ private: DistributorStripeComponent _distributor_component; const DistributorNodeContext& _node_ctx; - DistributorOperationContext& _op_ctx; + DistributorStripeOperationContext& _op_ctx; DistributorStripeInterface& _distributor_interface; std::deque<std::pair<framework::MilliSecTime, BucketRequest>> _delayed_requests; std::map<uint64_t, BucketRequest> _sent_messages; diff --git a/storage/src/vespa/storage/distributor/distributor_stripe_component.cpp b/storage/src/vespa/storage/distributor/distributor_stripe_component.cpp index ee131adf8ff..aef126b8318 100644 --- a/storage/src/vespa/storage/distributor/distributor_stripe_component.cpp +++ b/storage/src/vespa/storage/distributor/distributor_stripe_component.cpp @@ -177,7 +177,7 @@ DistributorStripeComponent::node_address(uint16_t node_index) const noexcept } -// Implements DistributorOperationContext +// Implements DistributorStripeOperationContext void DistributorStripeComponent::remove_nodes_from_bucket_database(const document::Bucket& bucket, const std::vector<uint16_t>& nodes) diff --git a/storage/src/vespa/storage/distributor/distributor_stripe_component.h b/storage/src/vespa/storage/distributor/distributor_stripe_component.h index cb69b963271..38fcb4ffef3 100644 --- a/storage/src/vespa/storage/distributor/distributor_stripe_component.h +++ b/storage/src/vespa/storage/distributor/distributor_stripe_component.h @@ -2,8 +2,8 @@ #pragma once #include "distributor_node_context.h" -#include "distributor_operation_context.h" #include "distributor_stripe_interface.h" +#include "distributor_stripe_operation_context.h" #include "document_selection_parser.h" #include "operationowner.h" #include "statechecker.h" @@ -30,7 +30,7 @@ struct DatabaseUpdate { */ class DistributorStripeComponent : public storage::DistributorComponent, public DistributorNodeContext, - public DistributorOperationContext, + public DistributorStripeOperationContext, public DocumentSelectionParser { public: @@ -62,7 +62,7 @@ public: */ api::StorageMessageAddress node_address(uint16_t node_index) const noexcept override; - // Implements DistributorOperationContext + // Implements DistributorStripeOperationContext api::Timestamp generate_unique_timestamp() override { return getUniqueTimestamp(); } /** diff --git a/storage/src/vespa/storage/distributor/distributor_operation_context.h b/storage/src/vespa/storage/distributor/distributor_stripe_operation_context.h index d9277a33088..8a62a102cc0 100644 --- a/storage/src/vespa/storage/distributor/distributor_operation_context.h +++ b/storage/src/vespa/storage/distributor/distributor_stripe_operation_context.h @@ -20,11 +20,11 @@ class DistributorBucketSpaceRepo; class PendingMessageTracker; /** - * Interface with functionality that is used when handling distributor operations. + * Interface with functionality that is used when handling distributor stripe operations. */ -class DistributorOperationContext { +class DistributorStripeOperationContext { public: - virtual ~DistributorOperationContext() {} + virtual ~DistributorStripeOperationContext() {} virtual api::Timestamp generate_unique_timestamp() = 0; virtual void update_bucket_database(const document::Bucket& bucket, const BucketCopy& changed_node, diff --git a/storage/src/vespa/storage/distributor/externaloperationhandler.cpp b/storage/src/vespa/storage/distributor/externaloperationhandler.cpp index 81201ff5469..2acd04f7eef 100644 --- a/storage/src/vespa/storage/distributor/externaloperationhandler.cpp +++ b/storage/src/vespa/storage/distributor/externaloperationhandler.cpp @@ -63,7 +63,7 @@ public: }; ExternalOperationHandler::ExternalOperationHandler(DistributorNodeContext& node_ctx, - DistributorOperationContext& op_ctx, + DistributorStripeOperationContext& op_ctx, DistributorMetricSet& metrics, ChainedMessageSender& msg_sender, OperationSequencer& operation_sequencer, diff --git a/storage/src/vespa/storage/distributor/externaloperationhandler.h b/storage/src/vespa/storage/distributor/externaloperationhandler.h index 6205321ce84..fc1aa00ea65 100644 --- a/storage/src/vespa/storage/distributor/externaloperationhandler.h +++ b/storage/src/vespa/storage/distributor/externaloperationhandler.h @@ -40,7 +40,7 @@ public: bool onGetBucketList(const std::shared_ptr<api::GetBucketListCommand>&) override; ExternalOperationHandler(DistributorNodeContext& node_ctx, - DistributorOperationContext& op_ctx, + DistributorStripeOperationContext& op_ctx, DistributorMetricSet& metrics, ChainedMessageSender& msg_sender, OperationSequencer& operation_sequencer, @@ -86,7 +86,7 @@ public: private: DistributorNodeContext& _node_ctx; - DistributorOperationContext& _op_ctx; + DistributorStripeOperationContext& _op_ctx; DistributorMetricSet& _metrics; ChainedMessageSender& _msg_sender; OperationSequencer& _operation_sequencer; diff --git a/storage/src/vespa/storage/distributor/idealstatemanager.h b/storage/src/vespa/storage/distributor/idealstatemanager.h index a5f80343512..ebcaad4cf96 100644 --- a/storage/src/vespa/storage/distributor/idealstatemanager.h +++ b/storage/src/vespa/storage/distributor/idealstatemanager.h @@ -77,8 +77,8 @@ public: } const DistributorNodeContext& node_context() const { return _distributorComponent; } - DistributorOperationContext& operation_context() { return _distributorComponent; } - const DistributorOperationContext& operation_context() const { return _distributorComponent; } + DistributorStripeOperationContext& operation_context() { return _distributorComponent; } + const DistributorStripeOperationContext& operation_context() const { return _distributorComponent; } DistributorBucketSpaceRepo &getBucketSpaceRepo() { return _bucketSpaceRepo; } const DistributorBucketSpaceRepo &getBucketSpaceRepo() const { return _bucketSpaceRepo; } diff --git a/storage/src/vespa/storage/distributor/operations/external/putoperation.cpp b/storage/src/vespa/storage/distributor/operations/external/putoperation.cpp index cb3c0be6cc5..de36bb60b2c 100644 --- a/storage/src/vespa/storage/distributor/operations/external/putoperation.cpp +++ b/storage/src/vespa/storage/distributor/operations/external/putoperation.cpp @@ -22,7 +22,7 @@ using namespace storage; using document::BucketSpace; PutOperation::PutOperation(DistributorNodeContext& node_ctx, - DistributorOperationContext& op_ctx, + DistributorStripeOperationContext& op_ctx, DistributorBucketSpace &bucketSpace, std::shared_ptr<api::PutCommand> msg, PersistenceOperationMetricSet& metric, SequencingHandle sequencingHandle) diff --git a/storage/src/vespa/storage/distributor/operations/external/putoperation.h b/storage/src/vespa/storage/distributor/operations/external/putoperation.h index 6503a5ce438..c9cfc08d63d 100644 --- a/storage/src/vespa/storage/distributor/operations/external/putoperation.h +++ b/storage/src/vespa/storage/distributor/operations/external/putoperation.h @@ -24,7 +24,7 @@ class PutOperation : public SequencedOperation { public: PutOperation(DistributorNodeContext& node_ctx, - DistributorOperationContext& op_ctx, + DistributorStripeOperationContext& op_ctx, DistributorBucketSpace &bucketSpace, std::shared_ptr<api::PutCommand> msg, PersistenceOperationMetricSet& metric, @@ -54,7 +54,7 @@ private: bool has_unavailable_targets_in_pending_state(const OperationTargetList& targets) const; std::shared_ptr<api::PutCommand> _msg; - DistributorOperationContext& _op_ctx; + DistributorStripeOperationContext& _op_ctx; DistributorBucketSpace &_bucketSpace; }; diff --git a/storage/src/vespa/storage/distributor/operations/external/removelocationoperation.cpp b/storage/src/vespa/storage/distributor/operations/external/removelocationoperation.cpp index ad308ee0c19..f8609dedde4 100644 --- a/storage/src/vespa/storage/distributor/operations/external/removelocationoperation.cpp +++ b/storage/src/vespa/storage/distributor/operations/external/removelocationoperation.cpp @@ -19,7 +19,7 @@ using document::BucketSpace; RemoveLocationOperation::RemoveLocationOperation( DistributorNodeContext& node_ctx, - DistributorOperationContext& op_ctx, + DistributorStripeOperationContext& op_ctx, DocumentSelectionParser& parser, DistributorBucketSpace &bucketSpace, std::shared_ptr<api::RemoveLocationCommand> msg, diff --git a/storage/src/vespa/storage/distributor/operations/external/removelocationoperation.h b/storage/src/vespa/storage/distributor/operations/external/removelocationoperation.h index 5cad43e02ca..bf09a95933f 100644 --- a/storage/src/vespa/storage/distributor/operations/external/removelocationoperation.h +++ b/storage/src/vespa/storage/distributor/operations/external/removelocationoperation.h @@ -16,7 +16,7 @@ class RemoveLocationOperation : public Operation { public: RemoveLocationOperation(DistributorNodeContext& node_ctx, - DistributorOperationContext& op_ctx, + DistributorStripeOperationContext& op_ctx, DocumentSelectionParser& parser, DistributorBucketSpace &bucketSpace, std::shared_ptr<api::RemoveLocationCommand> msg, diff --git a/storage/src/vespa/storage/distributor/operations/external/removeoperation.cpp b/storage/src/vespa/storage/distributor/operations/external/removeoperation.cpp index 722bcc7d27e..25c73d88e37 100644 --- a/storage/src/vespa/storage/distributor/operations/external/removeoperation.cpp +++ b/storage/src/vespa/storage/distributor/operations/external/removeoperation.cpp @@ -13,7 +13,7 @@ using namespace storage; using document::BucketSpace; RemoveOperation::RemoveOperation(DistributorNodeContext& node_ctx, - DistributorOperationContext& op_ctx, + DistributorStripeOperationContext& op_ctx, DistributorBucketSpace &bucketSpace, std::shared_ptr<api::RemoveCommand> msg, PersistenceOperationMetricSet& metric, diff --git a/storage/src/vespa/storage/distributor/operations/external/removeoperation.h b/storage/src/vespa/storage/distributor/operations/external/removeoperation.h index 8dc88cb1d65..32eb5bd3d70 100644 --- a/storage/src/vespa/storage/distributor/operations/external/removeoperation.h +++ b/storage/src/vespa/storage/distributor/operations/external/removeoperation.h @@ -16,7 +16,7 @@ class RemoveOperation : public SequencedOperation { public: RemoveOperation(DistributorNodeContext& node_ctx, - DistributorOperationContext& op_ctx, + DistributorStripeOperationContext& op_ctx, DistributorBucketSpace &bucketSpace, std::shared_ptr<api::RemoveCommand> msg, PersistenceOperationMetricSet& metric, diff --git a/storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.cpp b/storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.cpp index 362acdf18ec..1f8da7a0589 100644 --- a/storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.cpp +++ b/storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.cpp @@ -26,7 +26,7 @@ namespace storage::distributor { TwoPhaseUpdateOperation::TwoPhaseUpdateOperation( DistributorNodeContext& node_ctx, - DistributorOperationContext& op_ctx, + DistributorStripeOperationContext& op_ctx, DocumentSelectionParser& parser, DistributorBucketSpace &bucketSpace, std::shared_ptr<api::UpdateCommand> msg, diff --git a/storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.h b/storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.h index d353498c8e3..7817eb7bffd 100644 --- a/storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.h +++ b/storage/src/vespa/storage/distributor/operations/external/twophaseupdateoperation.h @@ -56,7 +56,7 @@ class TwoPhaseUpdateOperation : public SequencedOperation { public: TwoPhaseUpdateOperation(DistributorNodeContext& node_ctx, - DistributorOperationContext& op_ctx, + DistributorStripeOperationContext& op_ctx, DocumentSelectionParser& parser, DistributorBucketSpace &bucketSpace, std::shared_ptr<api::UpdateCommand> msg, @@ -146,7 +146,7 @@ private: std::shared_ptr<api::UpdateCommand> _updateCmd; std::shared_ptr<api::StorageReply> _updateReply; DistributorNodeContext& _node_ctx; - DistributorOperationContext& _op_ctx; + DistributorStripeOperationContext& _op_ctx; DocumentSelectionParser& _parser; DistributorBucketSpace &_bucketSpace; SentMessageMap _sentMessageMap; diff --git a/storage/src/vespa/storage/distributor/operations/external/updateoperation.cpp b/storage/src/vespa/storage/distributor/operations/external/updateoperation.cpp index 593814cb2f9..4530d7b2864 100644 --- a/storage/src/vespa/storage/distributor/operations/external/updateoperation.cpp +++ b/storage/src/vespa/storage/distributor/operations/external/updateoperation.cpp @@ -19,7 +19,7 @@ using document::BucketSpace; namespace storage::distributor { UpdateOperation::UpdateOperation(DistributorNodeContext& node_ctx, - DistributorOperationContext& op_ctx, + DistributorStripeOperationContext& op_ctx, DistributorBucketSpace& bucketSpace, const std::shared_ptr<api::UpdateCommand>& msg, std::vector<BucketDatabase::Entry> entries, diff --git a/storage/src/vespa/storage/distributor/operations/external/updateoperation.h b/storage/src/vespa/storage/distributor/operations/external/updateoperation.h index 9f0796e71d2..4e875b27133 100644 --- a/storage/src/vespa/storage/distributor/operations/external/updateoperation.h +++ b/storage/src/vespa/storage/distributor/operations/external/updateoperation.h @@ -24,7 +24,7 @@ class UpdateOperation : public Operation { public: UpdateOperation(DistributorNodeContext& node_ctx, - DistributorOperationContext& op_ctx, + DistributorStripeOperationContext& op_ctx, DistributorBucketSpace& bucketSpace, const std::shared_ptr<api::UpdateCommand>& msg, std::vector<BucketDatabase::Entry> entries, diff --git a/storage/src/vespa/storage/distributor/operations/external/visitoroperation.cpp b/storage/src/vespa/storage/distributor/operations/external/visitoroperation.cpp index 292a3a5fc0b..b4ad16f3323 100644 --- a/storage/src/vespa/storage/distributor/operations/external/visitoroperation.cpp +++ b/storage/src/vespa/storage/distributor/operations/external/visitoroperation.cpp @@ -64,7 +64,7 @@ matches_visitor_library(vespalib::stringref input, vespalib::stringref expected) VisitorOperation::VisitorOperation( DistributorNodeContext& node_ctx, - DistributorOperationContext& op_ctx, + DistributorStripeOperationContext& op_ctx, DistributorBucketSpace &bucketSpace, const api::CreateVisitorCommand::SP& m, const Config& config, diff --git a/storage/src/vespa/storage/distributor/operations/external/visitoroperation.h b/storage/src/vespa/storage/distributor/operations/external/visitoroperation.h index 179727a330c..794436a28e6 100644 --- a/storage/src/vespa/storage/distributor/operations/external/visitoroperation.h +++ b/storage/src/vespa/storage/distributor/operations/external/visitoroperation.h @@ -20,7 +20,7 @@ namespace storage::distributor { class DistributorBucketSpace; class DistributorNodeContext; -class DistributorOperationContext; +class DistributorStripeOperationContext; class VisitorOperation : public Operation { @@ -36,7 +36,7 @@ public: }; VisitorOperation(DistributorNodeContext& node_ctx, - DistributorOperationContext& op_ctx, + DistributorStripeOperationContext& op_ctx, DistributorBucketSpace &bucketSpace, const std::shared_ptr<api::CreateVisitorCommand>& msg, const Config& config, @@ -153,7 +153,7 @@ private: vespalib::duration timeLeft() const noexcept; DistributorNodeContext& _node_ctx; - DistributorOperationContext& _op_ctx; + DistributorStripeOperationContext& _op_ctx; DistributorBucketSpace &_bucketSpace; SentMessagesMap _sentMessages; diff --git a/storage/src/vespa/storage/distributor/persistencemessagetracker.cpp b/storage/src/vespa/storage/distributor/persistencemessagetracker.cpp index 173e29566ac..9328a43cc6b 100644 --- a/storage/src/vespa/storage/distributor/persistencemessagetracker.cpp +++ b/storage/src/vespa/storage/distributor/persistencemessagetracker.cpp @@ -16,7 +16,7 @@ PersistenceMessageTrackerImpl::PersistenceMessageTrackerImpl( PersistenceOperationMetricSet& metric, std::shared_ptr<api::BucketInfoReply> reply, DistributorNodeContext& node_ctx, - DistributorOperationContext& op_ctx, + DistributorStripeOperationContext& op_ctx, api::Timestamp revertTimestamp) : MessageTracker(node_ctx), _metric(metric), diff --git a/storage/src/vespa/storage/distributor/persistencemessagetracker.h b/storage/src/vespa/storage/distributor/persistencemessagetracker.h index 87b2d1e8de0..57d0a77364b 100644 --- a/storage/src/vespa/storage/distributor/persistencemessagetracker.h +++ b/storage/src/vespa/storage/distributor/persistencemessagetracker.h @@ -37,7 +37,7 @@ public: PersistenceMessageTrackerImpl(PersistenceOperationMetricSet& metric, std::shared_ptr<api::BucketInfoReply> reply, DistributorNodeContext& node_ctx, - DistributorOperationContext& op_ctx, + DistributorStripeOperationContext& op_ctx, api::Timestamp revertTimestamp = 0); ~PersistenceMessageTrackerImpl() override; @@ -71,7 +71,7 @@ private: PersistenceOperationMetricSet& _metric; std::shared_ptr<api::BucketInfoReply> _reply; - DistributorOperationContext& _op_ctx; + DistributorStripeOperationContext& _op_ctx; api::Timestamp _revertTimestamp; std::vector<BucketNodePair> _revertNodes; mbus::Trace _trace; diff --git a/storage/src/vespa/storage/distributor/stripe_bucket_db_updater.h b/storage/src/vespa/storage/distributor/stripe_bucket_db_updater.h index decaa964a59..67b31343f6f 100644 --- a/storage/src/vespa/storage/distributor/stripe_bucket_db_updater.h +++ b/storage/src/vespa/storage/distributor/stripe_bucket_db_updater.h @@ -61,7 +61,7 @@ public: bool reportStatus(std::ostream&, const framework::HttpUrlPath&) const override; void print(std::ostream& out, bool verbose, const std::string& indent) const; const DistributorNodeContext& node_context() const { return _node_ctx; } - DistributorOperationContext& operation_context() { return _op_ctx; } + DistributorStripeOperationContext& operation_context() { return _op_ctx; } /** * Returns whether the current PendingClusterState indicates that there has @@ -260,7 +260,7 @@ private: DistributorStripeComponent _distributorComponent; const DistributorNodeContext& _node_ctx; - DistributorOperationContext& _op_ctx; + DistributorStripeOperationContext& _op_ctx; DistributorStripeInterface& _distributor_interface; std::deque<std::pair<framework::MilliSecTime, BucketRequest> > _delayedRequests; std::map<uint64_t, BucketRequest> _sentMessages; |