]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: fix load_pg() during initialization 33595/head
authorYingxin Cheng <yingxin.cheng@intel.com>
Fri, 28 Feb 2020 04:27:12 +0000 (12:27 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Fri, 28 Feb 2020 04:27:12 +0000 (12:27 +0800)
fix a regression introduced by 80ac50f which dropped PG::read_state()
incorrectly.

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/osd/osd.cc
src/crimson/osd/pg.cc

index c65d909a1399c06735eb3e2d48aa405a56fe080e..f854f357f4ad72d412ba0a46cecd889e652a2b02 100644 (file)
@@ -530,7 +530,9 @@ seastar::future<Ref<PG>> OSD::load_pg(spg_t pgid)
   }).then([pgid, this] (auto&& create_map) {
     return make_pg(std::move(create_map), pgid, false);
   }).then([this, pgid](Ref<PG> pg) {
-    return seastar::make_ready_future<Ref<PG>>(std::move(pg));
+    return pg->read_state(store.get()).then([pg] {
+      return seastar::make_ready_future<Ref<PG>>(std::move(pg));
+    });
   }).handle_exception([pgid](auto ep) {
     logger().info("pg {} saw exception on load {}", pgid, ep);
     ceph_abort("Could not load pg" == 0);
index 37f7535d40656c8486f88a9f2aa6b6d5ddf696e2..4a60f385cbb27922b5f453f1683cdefdd42cb658 100644 (file)
@@ -363,10 +363,8 @@ void PG::init(
 
 seastar::future<> PG::read_state(crimson::os::FuturizedStore* store)
 {
-  return store->open_collection(coll_t(pgid)).then([this, store](auto ch) {
-    coll_ref = ch;
-    return PGMeta{store, pgid}.load();
-  }).then([this, store](pg_info_t pg_info, PastIntervals past_intervals) {
+  return PGMeta{store, pgid}.load(
+  ).then([this, store](pg_info_t pg_info, PastIntervals past_intervals) {
     return peering_state.init_from_disk_state(
        std::move(pg_info),
        std::move(past_intervals),