aboutsummaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@oath.com>2018-02-14 14:52:32 +0000
committerTor Egge <Tor.Egge@oath.com>2018-02-14 14:52:32 +0000
commitde6cd6dde28d43c7d3a82f329c77a088def3a467 (patch)
tree5b70597debea27edc9d6a2883316262885e74298 /storage
parent48cbaea4364894bae522ba8bff89305e2798fe4a (diff)
Always enable global distributor bucket space
Diffstat (limited to 'storage')
-rw-r--r--storage/src/tests/distributor/simplemaintenancescannertest.cpp2
-rw-r--r--storage/src/vespa/storage/distributor/distributor.cpp8
-rw-r--r--storage/src/vespa/storage/distributor/distributor_bucket_space_repo.cpp6
-rw-r--r--storage/src/vespa/storage/distributor/distributor_bucket_space_repo.h2
4 files changed, 7 insertions, 11 deletions
diff --git a/storage/src/tests/distributor/simplemaintenancescannertest.cpp b/storage/src/tests/distributor/simplemaintenancescannertest.cpp
index 48c24c06ea1..394df6024fd 100644
--- a/storage/src/tests/distributor/simplemaintenancescannertest.cpp
+++ b/storage/src/tests/distributor/simplemaintenancescannertest.cpp
@@ -60,7 +60,7 @@ void
SimpleMaintenanceScannerTest::setUp()
{
_priorityGenerator.reset(new MockMaintenancePriorityGenerator());
- _bucketSpaceRepo = std::make_unique<DistributorBucketSpaceRepo>(false);
+ _bucketSpaceRepo = std::make_unique<DistributorBucketSpaceRepo>();
_priorityDb.reset(new SimpleBucketPriorityDatabase());
_scanner.reset(new SimpleMaintenanceScanner(*_priorityDb, *_priorityGenerator, *_bucketSpaceRepo));
}
diff --git a/storage/src/vespa/storage/distributor/distributor.cpp b/storage/src/vespa/storage/distributor/distributor.cpp
index a559ce2ad1a..1c14772e645 100644
--- a/storage/src/vespa/storage/distributor/distributor.cpp
+++ b/storage/src/vespa/storage/distributor/distributor.cpp
@@ -65,7 +65,7 @@ Distributor::Distributor(DistributorComponentRegister& compReg,
framework::StatusReporter("distributor", "Distributor"),
_compReg(compReg),
_component(compReg, "distributor"),
- _bucketSpaceRepo(std::make_unique<DistributorBucketSpaceRepo>(_component.enableMultipleBucketSpaces())),
+ _bucketSpaceRepo(std::make_unique<DistributorBucketSpaceRepo>()),
_metrics(new DistributorMetricSet(_component.getLoadTypes()->getMetricLoadTypes())),
_operationOwner(*this, _component.getClock()),
_maintenanceOperationOwner(*this, _component.getClock()),
@@ -527,10 +527,8 @@ Distributor::propagateDefaultDistribution(
std::shared_ptr<const lib::Distribution> distribution)
{
_bucketSpaceRepo->get(document::FixedBucketSpaces::default_space()).setDistribution(distribution);
- if (_component.enableMultipleBucketSpaces()) {
- auto global_distr = GlobalBucketSpaceDistributionConverter::convert_to_global(*distribution);
- _bucketSpaceRepo->get(document::FixedBucketSpaces::global_space()).setDistribution(std::move(global_distr));
- }
+ auto global_distr = GlobalBucketSpaceDistributionConverter::convert_to_global(*distribution);
+ _bucketSpaceRepo->get(document::FixedBucketSpaces::global_space()).setDistribution(std::move(global_distr));
}
void
diff --git a/storage/src/vespa/storage/distributor/distributor_bucket_space_repo.cpp b/storage/src/vespa/storage/distributor/distributor_bucket_space_repo.cpp
index 117776cd242..cc1b1eb9a17 100644
--- a/storage/src/vespa/storage/distributor/distributor_bucket_space_repo.cpp
+++ b/storage/src/vespa/storage/distributor/distributor_bucket_space_repo.cpp
@@ -14,13 +14,11 @@ using document::BucketSpace;
namespace storage {
namespace distributor {
-DistributorBucketSpaceRepo::DistributorBucketSpaceRepo(bool enableGlobalBucketSpace)
+DistributorBucketSpaceRepo::DistributorBucketSpaceRepo()
: _map()
{
add(document::FixedBucketSpaces::default_space(), std::make_unique<DistributorBucketSpace>());
- if (enableGlobalBucketSpace) {
- add(document::FixedBucketSpaces::global_space(), std::make_unique<DistributorBucketSpace>());
- }
+ add(document::FixedBucketSpaces::global_space(), std::make_unique<DistributorBucketSpace>());
}
DistributorBucketSpaceRepo::~DistributorBucketSpaceRepo() = default;
diff --git a/storage/src/vespa/storage/distributor/distributor_bucket_space_repo.h b/storage/src/vespa/storage/distributor/distributor_bucket_space_repo.h
index 7d7db240ad9..e30438771b2 100644
--- a/storage/src/vespa/storage/distributor/distributor_bucket_space_repo.h
+++ b/storage/src/vespa/storage/distributor/distributor_bucket_space_repo.h
@@ -21,7 +21,7 @@ private:
BucketSpaceMap _map;
public:
- explicit DistributorBucketSpaceRepo(bool enableGlobalBucketSpace);
+ DistributorBucketSpaceRepo();
~DistributorBucketSpaceRepo();
DistributorBucketSpaceRepo(const DistributorBucketSpaceRepo&&) = delete;