diff options
author | Tor Brede Vekterli <vekterli@yahooinc.com> | 2021-09-15 13:33:23 +0000 |
---|---|---|
committer | Tor Brede Vekterli <vekterli@yahooinc.com> | 2021-09-15 13:33:23 +0000 |
commit | 5d492755b49433c1ef6d77c78b43b9759e26b5c9 (patch) | |
tree | a14d78096b4ba1deecd0518cf2d480dcc77ef2db /storage/src | |
parent | 83adcb91b4b910d06a20b555ec238df895f92130 (diff) |
Use ideal state cache when populating StateChecker context
Diffstat (limited to 'storage/src')
-rw-r--r-- | storage/src/vespa/storage/distributor/statechecker.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/storage/src/vespa/storage/distributor/statechecker.cpp b/storage/src/vespa/storage/distributor/statechecker.cpp index 049e39fa3fc..a11fa9a809a 100644 --- a/storage/src/vespa/storage/distributor/statechecker.cpp +++ b/storage/src/vespa/storage/distributor/statechecker.cpp @@ -58,7 +58,7 @@ StateChecker::Result::createStoredResult( IdealStateOperation::UP operation, MaintenancePriority::Priority priority) { - return Result(std::unique_ptr<ResultImpl>(new StoredResultImpl(std::move(operation), MaintenancePriority(priority)))); + return Result(std::make_unique<StoredResultImpl>(std::move(operation), MaintenancePriority(priority))); } StateChecker::Context::Context(const DistributorNodeContext& node_ctx_in, @@ -79,8 +79,7 @@ StateChecker::Context::Context(const DistributorNodeContext& node_ctx_in, db(distributorBucketSpace.getBucketDatabase()), stats(statsTracker) { - // TODO STRIPE use existing cache for computing ideal storage nodes for bucket - idealState = distribution.getIdealStorageNodes(systemState, bucket.getBucketId()); + idealState = distributorBucketSpace.get_ideal_service_layer_nodes_bundle(bucket.getBucketId()).get_available_nonretired_or_maintenance_nodes(); unorderedIdealState.insert(idealState.begin(), idealState.end()); } |