aboutsummaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@oath.com>2017-11-21 12:05:01 +0000
committerTor Egge <Tor.Egge@oath.com>2017-11-21 12:05:33 +0000
commitcab5cd6e6e0b2f32b0e23d70c92e04a715538e68 (patch)
treec983f0fdd9fe5fc88ce1425701cbc4ca9e019f29 /storage
parent7ea1f795615fb364ecf19969de396e31696487c2 (diff)
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.