]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PG,osd_types: improve check_new_interval debugging
authorSamuel Just <sam.just@inktank.com>
Fri, 22 Mar 2013 20:48:49 +0000 (13:48 -0700)
committerSamuel Just <sam.just@inktank.com>
Fri, 22 Mar 2013 21:15:16 +0000 (14:15 -0700)
Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit d611eba9caf45f2d977c627b123462a073f523a4)

src/osd/PG.cc
src/osd/osd_types.cc

index 60ec8e4f66222137ee75b80108094928177a89b2..fbaf70c23e568a808b5acaccebd44ef7849e9a73 100644 (file)
@@ -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;
index e0f2b9872812672eb5f865ab681517123ce9ff74..56619f5a4fc10baa63747b234ead5649c95b4f8e 100644 (file)
@@ -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;