]> git-server-git.apps.pok.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:06:45 +0000 (14:06 -0700)
Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
src/osd/PG.cc
src/osd/osd_types.cc

index c0d6cb4cf86f4911f1fd65eee95ce84afb75d2fa..231d4d175ba074fa1237305d75d7f5320a5bce3a 100644 (file)
@@ -4780,13 +4780,20 @@ void PG::start_peering_interval(const OSDMapRef lastmap,
     dirty_info = true;
     dirty_big_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 35847d7a5426a5309737fa4e914707d9eeaa03da..3fd134e31edce285dc7125e994a3442710ca9136 100644 (file)
@@ -1620,6 +1620,13 @@ bool pg_interval_t::check_new_interval(
     if (!i.acting.empty() &&
        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;