From 1db67c443d84dc5d1ff53cc820fdfd4a2128b680 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Thu, 23 Aug 2012 11:10:25 -0700 Subject: [PATCH] PG: In Active, don't transition to WantActingChange 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 --- src/osd/PG.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 88a2592f6adbd..0a1e56d678366 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -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::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(); } @@ -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(); } -- 2.39.5