From: David Zafman Date: Mon, 25 Nov 2013 20:57:19 +0000 (-0800) Subject: osd: Remove bogus assert(active == acting.size()) X-Git-Tag: v0.74~68^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=66f51f82d457f6d3170c47daed2ca3458b888df1;p=ceph.git osd: Remove bogus assert(active == acting.size()) 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 --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 4bcd5051d027..72c9dfa49322 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -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; ipast_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::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);