diff options
author | Geir Storli <geirst@verizonmedia.com> | 2021-09-06 11:12:56 +0000 |
---|---|---|
committer | Geir Storli <geirst@verizonmedia.com> | 2021-09-06 11:23:29 +0000 |
commit | fc2c8393740396ebd3517d5c23e1ac206b34d165 (patch) | |
tree | 251acd92191c2d96a6e0862c10b66a57e60e986f /storage | |
parent | e4b2d30868e766f9cb21284af6387e069472117b (diff) |
Rename BucketDBUpdater to TopLevelBucketDBUpdater.
Diffstat (limited to 'storage')
14 files changed, 76 insertions, 76 deletions
diff --git a/storage/src/tests/distributor/idealstatemanagertest.cpp b/storage/src/tests/distributor/idealstatemanagertest.cpp index 28a57fc6afd..0fbaabafda0 100644 --- a/storage/src/tests/distributor/idealstatemanagertest.cpp +++ b/storage/src/tests/distributor/idealstatemanagertest.cpp @@ -4,7 +4,7 @@ #include <vespa/document/bucket/fixed_bucket_spaces.h> #include <vespa/document/test/make_bucket_space.h> #include <vespa/document/test/make_document_bucket.h> -#include <vespa/storage/distributor/bucketdbupdater.h> +#include <vespa/storage/distributor/top_level_bucket_db_updater.h> #include <vespa/storage/distributor/top_level_distributor.h> #include <vespa/storage/distributor/distributor_stripe.h> #include <vespa/storage/distributor/operation_sequencer.h> diff --git a/storage/src/tests/distributor/legacy_bucket_db_updater_test.cpp b/storage/src/tests/distributor/legacy_bucket_db_updater_test.cpp index e73fa14c219..824fb51acb9 100644 --- a/storage/src/tests/distributor/legacy_bucket_db_updater_test.cpp +++ b/storage/src/tests/distributor/legacy_bucket_db_updater_test.cpp @@ -1,7 +1,7 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/storageapi/message/persistence.h> -#include <vespa/storage/distributor/bucketdbupdater.h> +#include <vespa/storage/distributor/top_level_bucket_db_updater.h> #include <vespa/storage/distributor/bucket_space_distribution_context.h> #include <vespa/storage/distributor/distributormetricsset.h> #include <vespa/storage/distributor/pending_bucket_space_db_transition.h> diff --git a/storage/src/tests/distributor/mergeoperationtest.cpp b/storage/src/tests/distributor/mergeoperationtest.cpp index aeffbccea33..e0929c53cca 100644 --- a/storage/src/tests/distributor/mergeoperationtest.cpp +++ b/storage/src/tests/distributor/mergeoperationtest.cpp @@ -3,7 +3,7 @@ #include <tests/distributor/distributor_stripe_test_util.h> #include <vespa/document/test/make_bucket_space.h> #include <vespa/document/test/make_document_bucket.h> -#include <vespa/storage/distributor/bucketdbupdater.h> +#include <vespa/storage/distributor/top_level_bucket_db_updater.h> #include <vespa/storage/distributor/top_level_distributor.h> #include <vespa/storage/distributor/idealstatemanager.h> #include <vespa/storage/distributor/operation_sequencer.h> diff --git a/storage/src/tests/distributor/statecheckerstest.cpp b/storage/src/tests/distributor/statecheckerstest.cpp index a3ac0bed5b5..add3d64a4d3 100644 --- a/storage/src/tests/distributor/statecheckerstest.cpp +++ b/storage/src/tests/distributor/statecheckerstest.cpp @@ -5,7 +5,7 @@ #include <vespa/document/bucket/fixed_bucket_spaces.h> #include <vespa/document/test/make_bucket_space.h> #include <vespa/document/test/make_document_bucket.h> -#include <vespa/storage/distributor/bucketdbupdater.h> +#include <vespa/storage/distributor/top_level_bucket_db_updater.h> #include <vespa/storage/distributor/top_level_distributor.h> #include <vespa/storage/distributor/distributor_bucket_space.h> #include <vespa/storage/distributor/distributor_stripe.h> diff --git a/storage/src/tests/distributor/top_level_distributor_test_util.cpp b/storage/src/tests/distributor/top_level_distributor_test_util.cpp index 2fe35b74e4f..0120ca91787 100644 --- a/storage/src/tests/distributor/top_level_distributor_test_util.cpp +++ b/storage/src/tests/distributor/top_level_distributor_test_util.cpp @@ -199,7 +199,7 @@ TopLevelDistributorTestUtil::get_bucket(const document::BucketId& bId) const return stripe_bucket_database(stripe_of_bucket(bId)).get(bId); } -BucketDBUpdater& +TopLevelBucketDBUpdater& TopLevelDistributorTestUtil::bucket_db_updater() { return *_distributor->_bucket_db_updater; } diff --git a/storage/src/tests/distributor/top_level_distributor_test_util.h b/storage/src/tests/distributor/top_level_distributor_test_util.h index 156f679993a..b12e9dff304 100644 --- a/storage/src/tests/distributor/top_level_distributor_test_util.h +++ b/storage/src/tests/distributor/top_level_distributor_test_util.h @@ -26,7 +26,7 @@ class DistributorStripeOperationContext; class DistributorStripePool; class IdealStateMetricSet; class Operation; -class BucketDBUpdater; +class TopLevelBucketDBUpdater; class TopLevelDistributorTestUtil : private DoneInitializeHandler { @@ -52,7 +52,7 @@ public: // As the above, but always inserts into default bucket space void add_nodes_to_stripe_bucket_db(const document::BucketId& id, const std::string& nodeStr); - BucketDBUpdater& bucket_db_updater(); + TopLevelBucketDBUpdater& bucket_db_updater(); const IdealStateMetricSet& total_ideal_state_metrics() const; const DistributorMetricSet& total_distributor_metrics() const; const storage::distributor::DistributorNodeContext& node_context() const; diff --git a/storage/src/vespa/storage/distributor/CMakeLists.txt b/storage/src/vespa/storage/distributor/CMakeLists.txt index 02e7055aaab..acaba014d27 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 bucket_space_distribution_context.cpp bucket_space_state_map.cpp bucket_spaces_stats_provider.cpp - bucketdbupdater.cpp bucketgctimecalculator.cpp bucketlistmerger.cpp clusterinformation.cpp @@ -51,6 +50,7 @@ vespa_add_library(storage_distributor statusreporterdelegate.cpp stripe_bucket_db_updater.cpp throttlingoperationstarter.cpp + top_level_bucket_db_updater.cpp top_level_distributor.cpp update_metric_set.cpp visitormetricsset.cpp diff --git a/storage/src/vespa/storage/distributor/pendingclusterstate.cpp b/storage/src/vespa/storage/distributor/pendingclusterstate.cpp index 77760174253..69cf5486a8a 100644 --- a/storage/src/vespa/storage/distributor/pendingclusterstate.cpp +++ b/storage/src/vespa/storage/distributor/pendingclusterstate.cpp @@ -2,7 +2,7 @@ #include "pendingclusterstate.h" #include "pending_bucket_space_db_transition.h" -#include "bucketdbupdater.h" +#include "top_level_bucket_db_updater.h" #include "distributor_bucket_space_repo.h" #include "distributor_bucket_space.h" #include <vespa/storageframework/defaultimplementation/clock/realclock.h> diff --git a/storage/src/vespa/storage/distributor/pendingclusterstate.h b/storage/src/vespa/storage/distributor/pendingclusterstate.h index af0c85fab95..babcebea69d 100644 --- a/storage/src/vespa/storage/distributor/pendingclusterstate.h +++ b/storage/src/vespa/storage/distributor/pendingclusterstate.h @@ -21,7 +21,7 @@ class DistributorBucketSpaceRepo; class StripeAccessGuard; /** - * Class used by BucketDBUpdater to track request bucket info + * Class used by TopLevelBucketDBUpdater to track request bucket info * messages sent to the storage nodes. */ class PendingClusterState : public vespalib::XmlSerializable { diff --git a/storage/src/vespa/storage/distributor/stripe_bucket_db_updater.cpp b/storage/src/vespa/storage/distributor/stripe_bucket_db_updater.cpp index b3ee60727a3..06a9672ba50 100644 --- a/storage/src/vespa/storage/distributor/stripe_bucket_db_updater.cpp +++ b/storage/src/vespa/storage/distributor/stripe_bucket_db_updater.cpp @@ -102,7 +102,7 @@ void StripeBucketDBUpdater::print(std::ostream& out, bool verbose, const std::string& indent) const { (void) verbose; (void) indent; - out << "BucketDBUpdater"; + out << "StripeBucketDBUpdater"; } bool @@ -870,7 +870,7 @@ StripeBucketDBUpdater::enableCurrentClusterStateBundleInDistributor() _pendingClusterState->getNewClusterStateBundle()); LOG(debug, - "BucketDBUpdater finished processing state %s", + "StripeBucketDBUpdater finished processing state %s", state.getBaselineClusterState()->toString().c_str()); _distributor_interface.enableClusterStateBundle(state); @@ -927,7 +927,7 @@ StripeBucketDBUpdater::reportStatus(std::ostream& out, using namespace vespalib::xml; XmlOutputStream xos(out); // FIXME(vekterli): have to do this manually since we cannot inherit - // directly from XmlStatusReporter due to data races when BucketDBUpdater + // directly from XmlStatusReporter due to data races when StripeBucketDBUpdater // gets status requests directly. xos << XmlTag("status") << XmlAttribute("id", BUCKETDB) diff --git a/storage/src/vespa/storage/distributor/bucketdbupdater.cpp b/storage/src/vespa/storage/distributor/top_level_bucket_db_updater.cpp index bdb8de7b9fe..8c258cda5e4 100644 --- a/storage/src/vespa/storage/distributor/bucketdbupdater.cpp +++ b/storage/src/vespa/storage/distributor/top_level_bucket_db_updater.cpp @@ -1,6 +1,6 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include "bucketdbupdater.h" +#include "top_level_bucket_db_updater.h" #include "bucket_db_prune_elision.h" #include "bucket_space_distribution_configs.h" #include "bucket_space_distribution_context.h" @@ -27,12 +27,12 @@ using document::BucketSpace; namespace storage::distributor { -BucketDBUpdater::BucketDBUpdater(const DistributorNodeContext& node_ctx, - DistributorOperationContext& op_ctx, - DistributorInterface& distributor_interface, - ChainedMessageSender& chained_sender, - std::shared_ptr<const lib::Distribution> bootstrap_distribution, - StripeAccessor& stripe_accessor) +TopLevelBucketDBUpdater::TopLevelBucketDBUpdater(const DistributorNodeContext& node_ctx, + DistributorOperationContext& op_ctx, + DistributorInterface& distributor_interface, + ChainedMessageSender& chained_sender, + std::shared_ptr<const lib::Distribution> bootstrap_distribution, + StripeAccessor& stripe_accessor) : framework::StatusReporter("bucketdb", "Bucket DB Updater"), _stripe_accessor(stripe_accessor), _active_state_bundle(lib::ClusterState()), @@ -52,10 +52,10 @@ BucketDBUpdater::BucketDBUpdater(const DistributorNodeContext& node_ctx, bootstrap_distribution_config(bootstrap_distribution); } -BucketDBUpdater::~BucketDBUpdater() = default; +TopLevelBucketDBUpdater::~TopLevelBucketDBUpdater() = default; void -BucketDBUpdater::propagate_active_state_bundle_internally() { +TopLevelBucketDBUpdater::propagate_active_state_bundle_internally() { for (auto* repo : {&_op_ctx.bucket_space_repo(), &_op_ctx.read_only_bucket_space_repo()}) { for (auto& iter : *repo) { iter.second->setClusterState(_active_state_bundle.getDerivedClusterState(iter.first)); @@ -64,7 +64,7 @@ BucketDBUpdater::propagate_active_state_bundle_internally() { } void -BucketDBUpdater::bootstrap_distribution_config(std::shared_ptr<const lib::Distribution> distribution) { +TopLevelBucketDBUpdater::bootstrap_distribution_config(std::shared_ptr<const lib::Distribution> distribution) { auto global_distr = GlobalBucketSpaceDistributionConverter::convert_to_global(*distribution); for (auto* repo : {&_op_ctx.bucket_space_repo(), &_op_ctx.read_only_bucket_space_repo()}) { repo->get(document::FixedBucketSpaces::default_space()).setDistribution(distribution); @@ -75,7 +75,7 @@ BucketDBUpdater::bootstrap_distribution_config(std::shared_ptr<const lib::Distri } void -BucketDBUpdater::propagate_distribution_config(const BucketSpaceDistributionConfigs& configs) { +TopLevelBucketDBUpdater::propagate_distribution_config(const BucketSpaceDistributionConfigs& configs) { for (auto* repo : {&_op_ctx.bucket_space_repo(), &_op_ctx.read_only_bucket_space_repo()}) { if (auto distr = configs.get_or_nullptr(document::FixedBucketSpaces::default_space())) { repo->get(document::FixedBucketSpaces::default_space()).setDistribution(distr); @@ -90,32 +90,32 @@ BucketDBUpdater::propagate_distribution_config(const BucketSpaceDistributionConf // Must at the very least ensure we use stripe-local TS generation for DB inserts...! i.e. no global TS // Or do we have to touch these at all here? Just defer all this via stripe interface? void -BucketDBUpdater::flush() +TopLevelBucketDBUpdater::flush() { // TODO STRIPE: Consider if this must flush_and_close() all stripes } void -BucketDBUpdater::print(std::ostream& out, bool verbose, const std::string& indent) const +TopLevelBucketDBUpdater::print(std::ostream& out, bool verbose, const std::string& indent) const { (void) verbose; (void) indent; - out << "BucketDBUpdater"; + out << "TopLevelBucketDBUpdater"; } bool -BucketDBUpdater::should_defer_state_enabling() const noexcept +TopLevelBucketDBUpdater::should_defer_state_enabling() const noexcept { return stale_reads_enabled(); } bool -BucketDBUpdater::has_pending_cluster_state() const +TopLevelBucketDBUpdater::has_pending_cluster_state() const { return static_cast<bool>(_pending_cluster_state); } void -BucketDBUpdater::remove_superfluous_buckets( +TopLevelBucketDBUpdater::remove_superfluous_buckets( StripeAccessGuard& guard, const lib::ClusterStateBundle& new_state, bool is_distribution_config_change) @@ -162,17 +162,17 @@ void maybe_sleep_for(std::chrono::milliseconds ms) { } void -BucketDBUpdater::maybe_inject_simulated_db_pruning_delay() { +TopLevelBucketDBUpdater::maybe_inject_simulated_db_pruning_delay() { maybe_sleep_for(_op_ctx.distributor_config().simulated_db_pruning_latency()); } void -BucketDBUpdater::maybe_inject_simulated_db_merging_delay() { +TopLevelBucketDBUpdater::maybe_inject_simulated_db_merging_delay() { maybe_sleep_for(_op_ctx.distributor_config().simulated_db_merging_latency()); } void -BucketDBUpdater::ensure_transition_timer_started() +TopLevelBucketDBUpdater::ensure_transition_timer_started() { // Don't overwrite start time if we're already processing a state, as // that will make transition times appear artificially low. @@ -182,14 +182,14 @@ BucketDBUpdater::ensure_transition_timer_started() } void -BucketDBUpdater::complete_transition_timer() +TopLevelBucketDBUpdater::complete_transition_timer() { _distributor_interface.metrics() .stateTransitionTime.addValue(_transition_timer.getElapsedTimeAsDouble()); } void -BucketDBUpdater::storage_distribution_changed(const BucketSpaceDistributionConfigs& configs) +TopLevelBucketDBUpdater::storage_distribution_changed(const BucketSpaceDistributionConfigs& configs) { propagate_distribution_config(configs); ensure_transition_timer_started(); @@ -215,7 +215,7 @@ BucketDBUpdater::storage_distribution_changed(const BucketSpaceDistributionConfi } void -BucketDBUpdater::reply_to_previous_pending_cluster_state_if_any() +TopLevelBucketDBUpdater::reply_to_previous_pending_cluster_state_if_any() { if (_pending_cluster_state.get() && _pending_cluster_state->hasCommand()) { _chained_sender.sendUp( @@ -224,7 +224,7 @@ BucketDBUpdater::reply_to_previous_pending_cluster_state_if_any() } void -BucketDBUpdater::reply_to_activation_with_actual_version( +TopLevelBucketDBUpdater::reply_to_activation_with_actual_version( const api::ActivateClusterStateVersionCommand& cmd, uint32_t actualVersion) { @@ -234,7 +234,7 @@ BucketDBUpdater::reply_to_activation_with_actual_version( } bool -BucketDBUpdater::onSetSystemState( +TopLevelBucketDBUpdater::onSetSystemState( const std::shared_ptr<api::SetSystemStateCommand>& cmd) { LOG(debug, "Received new cluster state %s", @@ -281,7 +281,7 @@ BucketDBUpdater::onSetSystemState( } bool -BucketDBUpdater::onActivateClusterStateVersion(const std::shared_ptr<api::ActivateClusterStateVersionCommand>& cmd) +TopLevelBucketDBUpdater::onActivateClusterStateVersion(const std::shared_ptr<api::ActivateClusterStateVersionCommand>& cmd) { if (has_pending_cluster_state() && _pending_cluster_state->isVersionedTransition()) { const auto pending_version = _pending_cluster_state->clusterStateVersion(); @@ -315,7 +315,7 @@ BucketDBUpdater::onActivateClusterStateVersion(const std::shared_ptr<api::Activa } bool -BucketDBUpdater::onRequestBucketInfoReply( +TopLevelBucketDBUpdater::onRequestBucketInfoReply( const std::shared_ptr<api::RequestBucketInfoReply>& repl) { if (pending_cluster_state_accepted(repl)) { @@ -325,7 +325,7 @@ BucketDBUpdater::onRequestBucketInfoReply( } bool -BucketDBUpdater::pending_cluster_state_accepted( +TopLevelBucketDBUpdater::pending_cluster_state_accepted( const std::shared_ptr<api::RequestBucketInfoReply>& repl) { if (_pending_cluster_state.get() @@ -343,7 +343,7 @@ BucketDBUpdater::pending_cluster_state_accepted( } void -BucketDBUpdater::resend_delayed_messages() +TopLevelBucketDBUpdater::resend_delayed_messages() { if (_pending_cluster_state) { _pending_cluster_state->resendDelayedMessages(); @@ -351,13 +351,13 @@ BucketDBUpdater::resend_delayed_messages() } bool -BucketDBUpdater::is_pending_cluster_state_completed() const +TopLevelBucketDBUpdater::is_pending_cluster_state_completed() const { return _pending_cluster_state.get() && _pending_cluster_state->done(); } void -BucketDBUpdater::process_completed_pending_cluster_state(StripeAccessGuard& guard) +TopLevelBucketDBUpdater::process_completed_pending_cluster_state(StripeAccessGuard& guard) { if (_pending_cluster_state->isDeferred()) { LOG(debug, "Deferring completion of pending cluster state version %u until explicitly activated", @@ -381,7 +381,7 @@ BucketDBUpdater::process_completed_pending_cluster_state(StripeAccessGuard& guar } void -BucketDBUpdater::activate_pending_cluster_state(StripeAccessGuard& guard) +TopLevelBucketDBUpdater::activate_pending_cluster_state(StripeAccessGuard& guard) { framework::MilliSecTimer process_timer(_node_ctx.clock()); @@ -414,21 +414,21 @@ BucketDBUpdater::activate_pending_cluster_state(StripeAccessGuard& guard) } void -BucketDBUpdater::enable_current_cluster_state_bundle_in_distributor_and_stripes(StripeAccessGuard& guard) +TopLevelBucketDBUpdater::enable_current_cluster_state_bundle_in_distributor_and_stripes(StripeAccessGuard& guard) { const lib::ClusterStateBundle& state = _pending_cluster_state->getNewClusterStateBundle(); _active_state_bundle = _pending_cluster_state->getNewClusterStateBundle(); propagate_active_state_bundle_internally(); - LOG(debug, "BucketDBUpdater finished processing state %s", + LOG(debug, "TopLevelBucketDBUpdater finished processing state %s", state.getBaselineClusterState()->toString().c_str()); guard.enable_cluster_state_bundle(state, _pending_cluster_state->hasBucketOwnershipTransfer()); } -void BucketDBUpdater::simulate_cluster_state_bundle_activation(const lib::ClusterStateBundle& activated_state, - bool has_bucket_ownership_transfer) +void TopLevelBucketDBUpdater::simulate_cluster_state_bundle_activation(const lib::ClusterStateBundle& activated_state, + bool has_bucket_ownership_transfer) { auto guard = _stripe_accessor.rendezvous_and_hold_all(); guard->enable_cluster_state_bundle(activated_state, has_bucket_ownership_transfer); @@ -438,7 +438,7 @@ void BucketDBUpdater::simulate_cluster_state_bundle_activation(const lib::Cluste } void -BucketDBUpdater::add_current_state_to_cluster_state_history() +TopLevelBucketDBUpdater::add_current_state_to_cluster_state_history() { _history.push_back(_pending_cluster_state->getSummary()); @@ -448,7 +448,7 @@ BucketDBUpdater::add_current_state_to_cluster_state_history() } vespalib::string -BucketDBUpdater::getReportContentType(const framework::HttpUrlPath&) const +TopLevelBucketDBUpdater::getReportContentType(const framework::HttpUrlPath&) const { return "text/xml"; } @@ -462,13 +462,13 @@ const vespalib::string BUCKETDB_UPDATER = "Bucket Database Updater"; } bool -BucketDBUpdater::reportStatus(std::ostream& out, - const framework::HttpUrlPath& path) const +TopLevelBucketDBUpdater::reportStatus(std::ostream& out, + const framework::HttpUrlPath& path) const { using namespace vespalib::xml; XmlOutputStream xos(out); // FIXME(vekterli): have to do this manually since we cannot inherit - // directly from XmlStatusReporter due to data races when BucketDBUpdater + // directly from XmlStatusReporter due to data races when TopLevelBucketDBUpdater // gets status requests directly. xos << XmlTag("status") << XmlAttribute("id", BUCKETDB) @@ -479,8 +479,8 @@ BucketDBUpdater::reportStatus(std::ostream& out, } vespalib::string -BucketDBUpdater::report_xml_status(vespalib::xml::XmlOutputStream& xos, - const framework::HttpUrlPath&) const +TopLevelBucketDBUpdater::report_xml_status(vespalib::xml::XmlOutputStream& xos, + const framework::HttpUrlPath&) const { using namespace vespalib::xml; xos << XmlTag("bucketdb") diff --git a/storage/src/vespa/storage/distributor/bucketdbupdater.h b/storage/src/vespa/storage/distributor/top_level_bucket_db_updater.h index 3cb87347a8f..c9e28eee72d 100644 --- a/storage/src/vespa/storage/distributor/bucketdbupdater.h +++ b/storage/src/vespa/storage/distributor/top_level_bucket_db_updater.h @@ -32,18 +32,18 @@ class DistributorInterface; class StripeAccessor; class StripeAccessGuard; -class BucketDBUpdater : public framework::StatusReporter, - public api::MessageHandler +class TopLevelBucketDBUpdater : public framework::StatusReporter, + public api::MessageHandler { public: using OutdatedNodesMap = dbtransition::OutdatedNodesMap; - BucketDBUpdater(const DistributorNodeContext& node_ctx, - DistributorOperationContext& op_ctx, - DistributorInterface& distributor_interface, - ChainedMessageSender& chained_sender, - std::shared_ptr<const lib::Distribution> bootstrap_distribution, - StripeAccessor& stripe_accessor); - ~BucketDBUpdater() override; + TopLevelBucketDBUpdater(const DistributorNodeContext& node_ctx, + DistributorOperationContext& op_ctx, + DistributorInterface& distributor_interface, + ChainedMessageSender& chained_sender, + std::shared_ptr<const lib::Distribution> bootstrap_distribution, + StripeAccessor& stripe_accessor); + ~TopLevelBucketDBUpdater() override; void flush(); @@ -75,7 +75,7 @@ private: friend class DistributorStripeTestUtil; friend class DistributorTestUtil; friend class TopLevelDistributorTestUtil; - // Only to be used by tests that want to ensure both the BucketDBUpdater _and_ the Distributor + // Only to be used by tests that want to ensure both the TopLevelBucketDBUpdater _and_ the Distributor // components agree on the currently active cluster state bundle. // Transitively invokes Distributor::enableClusterStateBundle void simulate_cluster_state_bundle_activation(const lib::ClusterStateBundle& activated_state, diff --git a/storage/src/vespa/storage/distributor/top_level_distributor.cpp b/storage/src/vespa/storage/distributor/top_level_distributor.cpp index 378a26dcc70..68a52e27d84 100644 --- a/storage/src/vespa/storage/distributor/top_level_distributor.cpp +++ b/storage/src/vespa/storage/distributor/top_level_distributor.cpp @@ -2,7 +2,7 @@ // #include "blockingoperationstarter.h" #include "bucket_space_distribution_configs.h" -#include "bucketdbupdater.h" +#include "top_level_bucket_db_updater.h" #include "top_level_distributor.h" #include "distributor_bucket_space.h" #include "distributor_status.h" @@ -112,10 +112,10 @@ TopLevelDistributor::TopLevelDistributor(DistributorComponentRegister& compReg, LOG(debug, "Setting up distributor with %u stripes using %u stripe bits", num_distributor_stripes, _n_stripe_bits); _stripe_accessor = std::make_unique<MultiThreadedStripeAccessor>(_stripe_pool); - _bucket_db_updater = std::make_unique<BucketDBUpdater>(_component, _component, - *this, *this, - _component.getDistribution(), - *_stripe_accessor); + _bucket_db_updater = std::make_unique<TopLevelBucketDBUpdater>(_component, _component, + *this, *this, + _component.getDistribution(), + *_stripe_accessor); _stripes.emplace_back(std::move(_stripe)); for (size_t i = 1; i < num_distributor_stripes; ++i) { _stripes.emplace_back(std::make_unique<DistributorStripe>(compReg, @@ -429,7 +429,7 @@ TopLevelDistributor::onDown(const std::shared_ptr<api::StorageMessage>& msg) bool TopLevelDistributor::handleReply(const std::shared_ptr<api::StorageReply>& reply) { - // TODO STRIPE this is used by tests. Do we need to invoke top-level BucketDBUpdater for any of them? + // TODO STRIPE this is used by tests. Do we need to invoke TopLevelBucketDBUpdater for any of them? assert(_use_legacy_mode); return _stripe->handleReply(reply); } diff --git a/storage/src/vespa/storage/distributor/top_level_distributor.h b/storage/src/vespa/storage/distributor/top_level_distributor.h index cd44252f4b0..57ff5268323 100644 --- a/storage/src/vespa/storage/distributor/top_level_distributor.h +++ b/storage/src/vespa/storage/distributor/top_level_distributor.h @@ -3,7 +3,7 @@ #pragma once #include "bucket_spaces_stats_provider.h" -#include "bucketdbupdater.h" +#include "top_level_bucket_db_updater.h" #include "distributor_component.h" #include "distributor_host_info_reporter.h" #include "distributor_interface.h" @@ -40,7 +40,7 @@ namespace storage::distributor { class BlockingOperationStarter; class BucketPriorityDatabase; -class BucketDBUpdater; +class TopLevelBucketDBUpdater; class DistributorBucketSpaceRepo; class DistributorStatus; class DistributorStripe; @@ -140,7 +140,7 @@ private: bool handleMessage(const std::shared_ptr<api::StorageMessage>& msg); /** - * Enables a new cluster state. Used by tests to bypass BucketDBUpdater. + * Enables a new cluster state. Used by tests to bypass TopLevelBucketDBUpdater. */ void enableClusterStateBundle(const lib::ClusterStateBundle& clusterStateBundle); @@ -225,7 +225,7 @@ private: distributor::DistributorComponent _component; storage::DistributorComponent _ideal_state_component; std::shared_ptr<const DistributorConfiguration> _total_config; - std::unique_ptr<BucketDBUpdater> _bucket_db_updater; + std::unique_ptr<TopLevelBucketDBUpdater> _bucket_db_updater; StatusReporterDelegate _distributorStatusDelegate; std::unique_ptr<StatusReporterDelegate> _bucket_db_status_delegate; framework::TickingThreadPool& _threadPool; |