From: Samuel Just Date: Fri, 22 Mar 2013 20:48:49 +0000 (-0700) Subject: PG,osd_types: improve check_new_interval debugging X-Git-Tag: v0.56.4~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d866814285667c7f9cd9205dca6cf95f3634c5fc;p=ceph.git PG,osd_types: improve check_new_interval debugging Backport: bobtail Signed-off-by: Samuel Just Reviewed-by: Sage Weil (cherry picked from commit d611eba9caf45f2d977c627b123462a073f523a4) --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 60ec8e4f6622..fbaf70c23e56 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -4745,13 +4745,20 @@ void PG::start_peering_interval(const OSDMapRef lastmap, dout(10) << " no lastmap" << dendl; dirty_info = true; } else { + std::stringstream debug; bool new_interval = pg_interval_t::check_new_interval( oldacting, newacting, oldup, newup, info.history.same_interval_since, info.history.last_epoch_clean, osdmap, - lastmap, info.pgid.pool(), info.pgid, &past_intervals); + lastmap, + info.pgid.pool(), + info.pgid, + &past_intervals, + &debug); + dout(10) << __func__ << ": check_new_interval output: " + << debug.str() << dendl; if (new_interval) { dout(10) << " noting past " << past_intervals.rbegin()->second << dendl; dirty_info = true; diff --git a/src/osd/osd_types.cc b/src/osd/osd_types.cc index e0f2b9872812..56619f5a4fc1 100644 --- a/src/osd/osd_types.cc +++ b/src/osd/osd_types.cc @@ -1581,6 +1581,13 @@ bool pg_interval_t::check_new_interval( if (i.acting.size() >= osdmap->get_pools().find(pool_id)->second.min_size) { + if (out) + *out << "generate_past_intervals " << i + << ": not rw," + << " up_thru " << lastmap->get_up_thru(i.acting[0]) + << " up_from " << lastmap->get_up_from(i.acting[0]) + << " last_epoch_clean " << last_epoch_clean + << std::endl; if (lastmap->get_up_thru(i.acting[0]) >= i.first && lastmap->get_up_from(i.acting[0]) <= i.first) { i.maybe_went_rw = true;