]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: update pg_creatings even the new acting set is empty 14730/head
authorKefu Chai <kchai@redhat.com>
Sat, 22 Apr 2017 08:42:11 +0000 (16:42 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 22 Apr 2017 08:46:42 +0000 (16:46 +0800)
there is chance that the acting set of a PG being created becomes empty,
and then OSDs joins the acting set. in that case, we need also update
the "create" epoch of the creating_pgs, so the new primary can be
updated with the MOSDPCreate message.

Fixes: http://tracker.ceph.com/issues/19744
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/mon/OSDMonitor.cc

index 952cbb612659f188a18191fda6f9e1141271359a..5b2c7d69ce8eaca022ef5e44407a343e6deca0eb 100644 (file)
@@ -3184,9 +3184,6 @@ void OSDMonitor::update_creating_pgs()
     auto pgid = pg.first;
     auto& created = pg.second.first;
     mapping.get(pgid, nullptr, nullptr, nullptr, &acting_primary);
-    if (acting_primary < 0) {
-      continue;
-    }
     // check the previous creating_pgs, look for the target to whom the pg was
     // previously mapped
     for (const auto& pgs_by_epoch : creating_pgs_by_osd_epoch) {