Skip to content

Commit

Permalink
PG: In Active, don't transition to WantActingChange
Browse files Browse the repository at this point in the history
want_acting is filled in during recovery completion in
order to move the newly backfilled osd into its correct
place.  In this case, however, want_acting must contain
only members of acting and up.  Thus, we can be sure that
if any of them go down, we would restart peering anyway.
Thus, we need not transition to WaitActingChange, which
does not reflect that we continue to serve client operations
in the interim.

Signed-off-by: Samuel Just <sam.just@inktank.com>
  • Loading branch information
Samuel Just committed Sep 4, 2012
1 parent 46b8642 commit 1db67c4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/osd/PG.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4646,6 +4646,16 @@ boost::statechart::result PG::RecoveryState::Active::react(const AdvMap& advmap)
pg->dirty_info = true;
}
pg->check_recovery_sources(pg->get_osdmap());

for (vector<int>::iterator p = pg->want_acting.begin();
p != pg->want_acting.end(); ++p) {
if (!advmap.osdmap->is_up(*p)) {
assert((std::find(pg->acting.begin(), pg->acting.end(), *p) !=
pg->acting.end()) ||
(std::find(pg->up.begin(), pg->up.end(), *p) !=
pg->up.end()));
}
}
return forward_event();
}

Expand Down Expand Up @@ -4768,7 +4778,6 @@ boost::statechart::result PG::RecoveryState::Active::react(const RecoveryComplet
if (pg->acting != pg->up &&
!pg->choose_acting(newest_update_osd)) {
assert(pg->want_acting.size());
post_event(NeedActingChange());
return discard_event();
}

Expand Down

0 comments on commit 1db67c4

Please sign in to comment.