diff options
author | Geir Storli <geirst@verizonmedia.com> | 2021-03-22 16:17:25 +0000 |
---|---|---|
committer | Geir Storli <geirst@verizonmedia.com> | 2021-03-23 08:13:38 +0000 |
commit | f2b4f5d9dc6c2ec5e37d24e2ef6ccb0db906412f (patch) | |
tree | 321169a321a804107772742cd7597f236dbae16d /storage | |
parent | fc2e817ddeb3a1fb21e18547c9e272fc28c308c7 (diff) |
Remove unused functions.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/src/vespa/storage/distributor/distributor_stripe_component.cpp | 29 | ||||
-rw-r--r-- | storage/src/vespa/storage/distributor/distributor_stripe_component.h | 12 |
2 files changed, 0 insertions, 41 deletions
diff --git a/storage/src/vespa/storage/distributor/distributor_stripe_component.cpp b/storage/src/vespa/storage/distributor/distributor_stripe_component.cpp index 4aab82ee6f8..34d482c45ac 100644 --- a/storage/src/vespa/storage/distributor/distributor_stripe_component.cpp +++ b/storage/src/vespa/storage/distributor/distributor_stripe_component.cpp @@ -41,26 +41,6 @@ DistributorStripeComponent::sendUp(const api::StorageMessage::SP& msg) _distributor.getMessageSender().sendUp(msg); } -bool -DistributorStripeComponent::checkDistribution(api::StorageCommand &cmd, const document::Bucket &bucket) -{ - auto &bucket_space(_bucketSpaceRepo.get(bucket.getBucketSpace())); - BucketOwnership bo(bucket_space.check_ownership_in_pending_and_current_state(bucket.getBucketId())); - if (!bo.isOwned()) { - std::string systemStateStr = bo.getNonOwnedState().toString(); - LOG(debug, - "Got message with wrong distribution, bucket %s sending back state '%s'", - bucket.toString().c_str(), systemStateStr.c_str()); - - api::StorageReply::UP reply(cmd.makeReply()); - api::ReturnCode ret(api::ReturnCode::WRONG_DISTRIBUTION, systemStateStr); - reply->setResult(ret); - sendUp(std::shared_ptr<api::StorageMessage>(reply.release())); - return false; - } - return true; -} - void DistributorStripeComponent::removeNodesFromDB(const document::Bucket &bucket, const std::vector<uint16_t>& nodes) { @@ -251,15 +231,6 @@ DistributorStripeComponent::getSibling(const document::BucketId& bid) const { return (zeroBucket == bid) ? oneBucket : zeroBucket; }; -BucketDatabase::Entry -DistributorStripeComponent::createAppropriateBucket(const document::Bucket &bucket) -{ - auto &bucketSpace(_bucketSpaceRepo.get(bucket.getBucketSpace())); - return bucketSpace.getBucketDatabase().createAppropriateBucket( - _distributor.getConfig().getMinimalBucketSplit(), - bucket.getBucketId()); -} - // Implements DistributorNodeContext api::StorageMessageAddress DistributorStripeComponent::node_address(uint16_t node_index) const noexcept diff --git a/storage/src/vespa/storage/distributor/distributor_stripe_component.h b/storage/src/vespa/storage/distributor/distributor_stripe_component.h index 8ed1ec4f0b8..4f1d5f7453a 100644 --- a/storage/src/vespa/storage/distributor/distributor_stripe_component.h +++ b/storage/src/vespa/storage/distributor/distributor_stripe_component.h @@ -43,12 +43,6 @@ public: ~DistributorStripeComponent() override; /** - * Verifies that the given command has been received at the - * correct distributor based on the current system state. - */ - bool checkDistribution(api::StorageCommand& cmd, const document::Bucket &bucket); - - /** * Removes the given bucket copies from the bucket database. * If the resulting bucket is empty afterwards, removes the entire * bucket entry from the bucket database. @@ -77,12 +71,6 @@ public: */ document::BucketId getSibling(const document::BucketId& bid) const; - /** - * Create a bucket that is split correctly according to other buckets that - * are in the bucket database. - */ - BucketDatabase::Entry createAppropriateBucket(const document::Bucket &bucket); - // Implements DistributorNodeContext const framework::Clock& clock() const noexcept override { return getClock(); } const vespalib::string * cluster_name_ptr() const noexcept override { return cluster_context().cluster_name_ptr(); } |