From: Tao Chang Date: Mon, 9 May 2016 13:50:17 +0000 (-0400) Subject: Cleanup: delete find_best_info again X-Git-Tag: v10.2.4~53^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5ef90856ce26761b31cfd4eb1bea4dfbe88cfb13;p=ceph.git Cleanup: delete find_best_info again After called find_best_info find a auth_pg_shard, it must be not incomplete, so it will not enter find_best_info again. Signed-off-by: Tao Chang (cherry picked from commit a25cfc4d46c03d8d78e0254c728ea5c29e2246e1) --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 69331a5243ac2..0dfd8f3eb1062 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -1328,26 +1328,7 @@ bool PG::choose_acting(pg_shard_t &auth_log_shard_id, bool *history_les_bound) return false; } - if ((up.size() && - !all_info.find(up_primary)->second.is_incomplete() && - all_info.find(up_primary)->second.last_update >= - auth_log_shard->second.log_tail) && - auth_log_shard->second.is_incomplete()) { - map complete_infos; - for (map::const_iterator i = all_info.begin(); - i != all_info.end(); - ++i) { - if (!i->second.is_incomplete()) - complete_infos.insert(*i); - } - map::const_iterator i = find_best_info( - complete_infos, - history_les_bound); - if (i != complete_infos.end()) { - auth_log_shard = all_info.find(i->first); - } - } - + assert(!auth_log_shard->second.is_incomplete()); auth_log_shard_id = auth_log_shard->first; // Determine if compatibility needed