]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix same_acting_since update
authorSage Weil <sage.weil@dreamhost.com>
Thu, 6 Oct 2011 04:41:15 +0000 (21:41 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Thu, 6 Oct 2011 04:41:15 +0000 (21:41 -0700)
same_acting_since actually means "same acting AND up set since".  This is
what the other same_acting_since update does (see a22511d).

We should rename it same_interval_since or something similar.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/osd/OSD.cc
src/osd/PG.h

index 064b5741d7c621cb8d87ce78fc914046c3a94d3d..2e925050e52a59137b78ef93dbc211d9b44bd88c 100644 (file)
@@ -1350,14 +1350,16 @@ void OSD::project_pg_history(pg_t pgid, PG::Info::History& h, epoch_t from,
     oldmap->pg_to_up_acting_osds(pgid, up, acting);
 
     // acting set change?
-    if (acting != currentacting && e > h.same_acting_since) {
-      dout(15) << "project_pg_history " << pgid << " changed in " << e 
-                << " from " << acting << " -> " << currentacting << dendl;
+    if ((acting != currentacting || up != currentup) && e > h.same_acting_since) {
+      dout(15) << "project_pg_history " << pgid << " acting|up changed in " << e 
+              << " from " << acting << "/" << up
+              << " -> " << currentacting << "/" << currentup
+              << dendl;
       h.same_acting_since = e;
     }
     // up set change?
     if (up != currentup && e > h.same_up_since) {
-      dout(15) << "project_pg_history " << pgid << " changed in " << e 
+      dout(15) << "project_pg_history " << pgid << " up changed in " << e 
                 << " from " << up << " -> " << currentup << dendl;
       h.same_up_since = e;
     }
index ae2e042ddda36ff828fce80358ba766a06bacb94..46d85faa41cc8438ed15e77e9dda56d9586a28b8 100644 (file)
@@ -185,7 +185,7 @@ public:
       epoch_t last_epoch_split;    // as parent
 
       epoch_t same_up_since;       // same acting set since
-      epoch_t same_acting_since;   // same acting set since
+      epoch_t same_acting_since;   // same acting AND up set since
       epoch_t same_primary_since;  // same primary at least back through this epoch.
 
       eversion_t last_scrub;