summaryrefslogtreecommitdiffstats
path: root/storage/src
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2020-12-02 14:10:39 +0100
committerTor Egge <Tor.Egge@broadpark.no>2020-12-02 14:10:39 +0100
commit6a47eecdb9420cf39702e1b8245883763cba3849 (patch)
treed74a6084d27ebd046dfc4037a8bd10ff6054b4c8 /storage/src
parentf52796b5398f0b32037e4ab84a439d16c7ade9af (diff)
Remove getIdealNodes() trampoline member function from DistributorComponent.
Diffstat (limited to 'storage/src')
-rw-r--r--storage/src/tests/distributor/putoperationtest.cpp3
-rw-r--r--storage/src/vespa/storage/distributor/distributor_bucket_space.h3
-rw-r--r--storage/src/vespa/storage/distributor/distributorcomponent.cpp7
-rw-r--r--storage/src/vespa/storage/distributor/distributorcomponent.h5
4 files changed, 5 insertions, 13 deletions
diff --git a/storage/src/tests/distributor/putoperationtest.cpp b/storage/src/tests/distributor/putoperationtest.cpp
index 1515eba4bf0..e86eded7392 100644
--- a/storage/src/tests/distributor/putoperationtest.cpp
+++ b/storage/src/tests/distributor/putoperationtest.cpp
@@ -3,6 +3,7 @@
#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/storage/distributor/operations/external/putoperation.h>
#include <vespa/storage/distributor/distributor.h>
+#include <vespa/storage/distributor/distributor_bucket_space.h>
#include <vespa/storageapi/message/bucket.h>
#include <vespa/storageapi/message/persistence.h>
#include <vespa/storageapi/message/state.h>
@@ -483,7 +484,7 @@ PutOperationTest::getNodes(const std::string& infoString) {
std::vector<uint16_t> targetNodes;
std::vector<uint16_t> createNodes;
- PutOperation::getTargetNodes(getExternalOperationHandler().getIdealNodes(makeDocumentBucket(bid)),
+ PutOperation::getTargetNodes(getDistributorBucketSpace().get_ideal_nodes(bid),
targetNodes, createNodes, entry, 2);
ost << "target( ";
diff --git a/storage/src/vespa/storage/distributor/distributor_bucket_space.h b/storage/src/vespa/storage/distributor/distributor_bucket_space.h
index 52f8f5f869c..96536b26da3 100644
--- a/storage/src/vespa/storage/distributor/distributor_bucket_space.h
+++ b/storage/src/vespa/storage/distributor/distributor_bucket_space.h
@@ -109,6 +109,9 @@ public:
document::BucketId bucket) const;
BucketOwnership check_ownership_in_pending_and_current_state_fallback(document::BucketId bucket) const;
const std::vector<bool>& get_available_nodes() const { return _available_nodes; }
+ /**
+ * Returns the ideal nodes for the given bucket.
+ */
std::vector<uint16_t> get_ideal_nodes(document::BucketId bucket) const;
/**
* Returns the ownership status of a bucket as decided with the current
diff --git a/storage/src/vespa/storage/distributor/distributorcomponent.cpp b/storage/src/vespa/storage/distributor/distributorcomponent.cpp
index bdbfb61f996..41a99092174 100644
--- a/storage/src/vespa/storage/distributor/distributorcomponent.cpp
+++ b/storage/src/vespa/storage/distributor/distributorcomponent.cpp
@@ -48,13 +48,6 @@ DistributorComponent::getClusterStateBundle() const
return _distributor.getClusterStateBundle();
};
-std::vector<uint16_t>
-DistributorComponent::getIdealNodes(const document::Bucket &bucket) const
-{
- auto &bucket_space(_bucketSpaceRepo.get(bucket.getBucketSpace()));
- return bucket_space.get_ideal_nodes(bucket.getBucketId());
-}
-
api::StorageMessageAddress
DistributorComponent::nodeAddress(uint16_t nodeIndex) const
{
diff --git a/storage/src/vespa/storage/distributor/distributorcomponent.h b/storage/src/vespa/storage/distributor/distributorcomponent.h
index 896166c74ce..d7fffaaf271 100644
--- a/storage/src/vespa/storage/distributor/distributorcomponent.h
+++ b/storage/src/vespa/storage/distributor/distributorcomponent.h
@@ -49,11 +49,6 @@ public:
const lib::ClusterStateBundle& getClusterStateBundle() const;
/**
- * Returns the ideal nodes for the given bucket.
- */
- std::vector<uint16_t> getIdealNodes(const document::Bucket &bucket) const;
-
- /**
* Returns the slobrok address of the given storage node.
*/
api::StorageMessageAddress nodeAddress(uint16_t nodeIndex) const;