diff options
author | Tor Egge <Tor.Egge@broadpark.no> | 2018-02-15 11:18:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-15 11:18:45 +0100 |
commit | 23290c4f1bd7a09dd7dd2f1b5e2eecbea17913be (patch) | |
tree | f7808798575672d5fb4aabe5ac0c7e286d5b6f14 | |
parent | 69f1b4c0b67c392ecfa3bca5484ff434ad6a0ac9 (diff) | |
parent | de6cd6dde28d43c7d3a82f329c77a088def3a467 (diff) |
Merge pull request #5041 from vespa-engine/toregge/always-enable-global-distributor-bucket-space
Always enable global distributor bucket space
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; |