]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Cleanup: delete find_best_info again 8370/head
authorTao Chang <changtao@hihuron.com>
Mon, 9 May 2016 13:50:17 +0000 (09:50 -0400)
committerTao Chang <changtao@hihuron.com>
Mon, 9 May 2016 13:50:17 +0000 (09:50 -0400)
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 <changtao@hihuron.com>
src/osd/PG.cc

index 629d0d58dcb08b20a55ac322f0119683cafcd65a..c5fcd9ab2dd5992900f9943146e10852b658673b 100644 (file)
@@ -1325,26 +1325,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<pg_shard_t, pg_info_t> complete_infos;
-    for (map<pg_shard_t, pg_info_t>::const_iterator i = all_info.begin();
-        i != all_info.end();
-        ++i) {
-      if (!i->second.is_incomplete())
-       complete_infos.insert(*i);
-    }
-    map<pg_shard_t, pg_info_t>::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