summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorGeir Storli <geirstorli@yahoo.no>2017-11-21 14:56:00 +0100
committerGitHub <noreply@github.com>2017-11-21 14:56:00 +0100
commit54956d3ddc2d02a380f1296c3160816c84cc2446 (patch)
tree59179a57c8dac8ec33d49a3143c1f1517e6c8ff2 /storage
parent37b2885f24f82f316f231adec6cea9d90c2ea4d8 (diff)
parentcab5cd6e6e0b2f32b0e23d70c92e04a715538e68 (diff)
Merge pull request #4217 from vespa-engine/toregge/use-content-bucket-space-to-get-distribution-pass-2
Use ContentBucketSpace to get Distribution.
Diffstat (limited to 'storage')
-rw-r--r--storage/src/vespa/storage/persistence/bucketownershipnotifier.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/storage/src/vespa/storage/persistence/bucketownershipnotifier.cpp b/storage/src/vespa/storage/persistence/bucketownershipnotifier.cpp
index ae028dd20bd..900fa71d7a0 100644
--- a/storage/src/vespa/storage/persistence/bucketownershipnotifier.cpp
+++ b/storage/src/vespa/storage/persistence/bucketownershipnotifier.cpp
@@ -3,6 +3,7 @@
#include "bucketownershipnotifier.h"
#include <vespa/storage/common/nodestateupdater.h>
#include <vespa/storage/common/bucketoperationlogger.h>
+#include <vespa/storage/common/content_bucket_space_repo.h>
#include <vespa/storageapi/message/bucket.h>
#include <vespa/vdslib/distribution/distribution.h>
#include <vespa/vespalib/util/backtrace.h>
@@ -19,7 +20,8 @@ BucketOwnershipNotifier::getOwnerDistributorForBucket(
const document::Bucket &bucket) const
{
try {
- return (_component.getDistribution()->getIdealDistributorNode(
+ auto distribution(_component.getBucketSpaceRepo().get(bucket.getBucketSpace()).getDistribution());
+ return (distribution->getIdealDistributorNode(
*_component.getStateUpdater().getSystemState(), bucket.getBucketId()));
// If we get exceptions there aren't any distributors, so they'll have
// to explicitly fetch all bucket info eventually anyway.