diff options
author | Samuel Just <sam.just@inktank.com> | 2013-03-22 13:48:49 -0700 |
---|---|---|
committer | Samuel Just <sam.just@inktank.com> | 2013-03-22 14:15:16 -0700 |
commit | d866814285667c7f9cd9205dca6cf95f3634c5fc (patch) | |
tree | 420cb032f0549b3434ad6bdd92757b4e97e22204 | |
parent | fc3406f395103737e5784611e2b38fd1c4f26369 (diff) | |
download | ceph-d866814285667c7f9cd9205dca6cf95f3634c5fc.tar.gz |
PG,osd_types: improve check_new_interval debugging
Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit d611eba9caf45f2d977c627b123462a073f523a4)
-rw-r--r-- | src/osd/PG.cc | 9 | ||||
-rw-r--r-- | src/osd/osd_types.cc | 7 |
2 files changed, 15 insertions, 1 deletions
diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 60ec8e4f662..fbaf70c23e5 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 e0f2b987281..56619f5a4fc 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; |