Skip to content

Commit

Permalink
osd: Remove bogus assert(active == acting.size())
Browse files Browse the repository at this point in the history
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: ceph#6896

Signed-off-by: David Zafman <[email protected]>
  • Loading branch information
David Zafman committed Nov 25, 2013
1 parent 5ccc2ec commit 66f51f8
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/osd/PG.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 66f51f8

Please sign in to comment.