Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osd/PG: perfer EC async_recovery_targets in reverse order of cost #21588

Merged
merged 1 commit into from Apr 23, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/osd/PG.cc
Expand Up @@ -1528,8 +1528,9 @@ void PG::choose_async_recovery_ec(const map<pg_shard_t, pg_info_t> &all_info,
<< dendl;

// take out as many osds as we can for async recovery, in order of cost
for (auto weighted_shard : candidates_by_cost) {
pg_shard_t cur_shard = weighted_shard.second;
for (auto rit = candidates_by_cost.rbegin();
rit != candidates_by_cost.rend(); ++rit) {
pg_shard_t cur_shard = rit->second;
vector<int> candidate_want(*want);
candidate_want[cur_shard.shard.id] = CRUSH_ITEM_NONE;
if (recoverable_and_ge_min_size(candidate_want)) {
Expand Down