]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "PG: only complete replicas should count toward min_size"
authorSage Weil <sage@inktank.com>
Tue, 1 Apr 2014 22:52:52 +0000 (15:52 -0700)
committerSage Weil <sage@inktank.com>
Tue, 1 Apr 2014 23:01:32 +0000 (16:01 -0700)
This reverts commit b097a237e11b48c47d3fd5484f3449e683e95db0.

This causes us to crash, probably because whoami is not in peer_info but
may be in want.

src/osd/PG.cc

index a0a957a19f7e3b8512125c6ad579288037885e8b..66329b3442d9f20e946abad7b24ea9c49220876b 100644 (file)
@@ -1011,15 +1011,7 @@ bool PG::choose_acting(int& newest_update_osd)
     return false;
   }
 
-  unsigned complete = 0;
-  for (vector<int>::iterator i = want.begin();
-       i != want.end();
-       ++i) {
-    assert(peer_info.count(*i));
-    if (!peer_info[*i].is_incomplete())
-      complete++;
-  }
-  if (complete < pool.info.min_size) {
+  if (want.size() < pool.info.min_size) {
     want_acting.clear();
     return false;
   }