}).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);
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),