]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Remove bogus assert(active == acting.size()) 868/head
authorDavid Zafman <david.zafman@inktank.com>
Mon, 25 Nov 2013 20:57:19 +0000 (12:57 -0800)
committerDavid Zafman <david.zafman@inktank.com>
Mon, 25 Nov 2013 21:20:49 +0000 (13:20 -0800)
We saw this assert because active is not correctly computed.
Remove assert and incorrectly computed active count.
We already use acting.size() to determine whether to set PG_STATE_DEGRADED.

Fixes: #6896
Signed-off-by: David Zafman <david.zafman@inktank.com>
src/osd/PG.cc

index 4bcd5051d027721204069b78e5d77107bec43b28..72c9dfa49322c9d41d442fe5029114a91bb3a69a 100644 (file)
@@ -1204,9 +1204,6 @@ void PG::activate(ObjectStore::Transaction& t,
   if (is_primary()) {
     // start up replicas
 
-    // count replicas that are not backfilling
-    unsigned active = 1;
-
     assert(actingbackfill.size() > 0);
     for (unsigned i=1; i<actingbackfill.size(); i++) {
       int peer = actingbackfill[i];
@@ -1269,9 +1266,6 @@ void PG::activate(ObjectStore::Transaction& t,
       if (needs_past_intervals)
        m->past_intervals = past_intervals;
 
-      if (pi.last_backfill == hobject_t::get_max())
-       active++;
-
       // update local version of peer's missing list!
       if (m && pi.last_backfill != hobject_t()) {
         for (list<pg_log_entry_t>::iterator p = m->log.log.begin();
@@ -1299,8 +1293,6 @@ void PG::activate(ObjectStore::Transaction& t,
       }
     }
 
-    assert(active == acting.size());
-
     // degraded?
     if (get_osdmap()->get_pg_size(info.pgid) > acting.size())
       state_set(PG_STATE_DEGRADED);