]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix build_initial_pg_history 17496/head
authorw11979 <wang.wenfeng@h3c.com>
Fri, 1 Sep 2017 14:02:34 +0000 (10:02 -0400)
committerNathan Cutler <ncutler@suse.com>
Tue, 5 Sep 2017 15:15:41 +0000 (17:15 +0200)
We need to update our info about the previous interval in order to
detect interval changes properly.

Fixes: http://tracker.ceph.com/issues/21203
Signed-off-by: w11979 <wang.wenfeng@h3c.com>
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit afdacc6ed76dd288fdbc0f99857d9ffba23c5132)

src/osd/OSD.cc

index 28608f1250a9cdad07cd584d1f0f8390972c0841..7795b857b9db288d0b479e83a59d905666276697 100644 (file)
@@ -4454,6 +4454,10 @@ void OSD::build_initial_pg_history(
       h->last_epoch_split = e;
     }
     lastmap = osdmap;
+    up_primary = new_up_primary;
+    acting_primary = new_acting_primary;
+    up = new_up;
+    acting = new_acting;
   }
   dout(20) << __func__ << " " << debug.str() << dendl;
   dout(10) << __func__ << " " << *h << " " << *pi