From cab5cd6e6e0b2f32b0e23d70c92e04a715538e68 Mon Sep 17 00:00:00 2001 From: Tor Egge Date: Tue, 21 Nov 2017 12:05:01 +0000 Subject: Use ContentBucketSpace to get Distribution. --- storage/src/vespa/storage/persistence/bucketownershipnotifier.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 #include +#include #include #include #include @@ -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. -- cgit v1.2.3