From: Yingxin Cheng Date: Tue, 21 May 2024 06:00:28 +0000 (+0800) Subject: crimson/osd: move stats_timer after store is mounted X-Git-Tag: v19.1.1~213^2~8 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=bca85e714eab490fdfa6ec6796c7c7ea46b31651;p=ceph.git crimson/osd: move stats_timer after store is mounted To report stats after the store is initialized. Signed-off-by: Yingxin Cheng (cherry picked from commit f183adb469ceb647fd2c2dad25d10adbc891b711) --- diff --git a/src/crimson/osd/osd.cc b/src/crimson/osd/osd.cc index 0a40a7158f8a7..6bdda0a8cf929 100644 --- a/src/crimson/osd/osd.cc +++ b/src/crimson/osd/osd.cc @@ -384,6 +384,16 @@ seastar::future<> OSD::start() std::ref(store), std::ref(osd_states)); }); + }).then([this, FNAME] { + heartbeat.reset(new Heartbeat{ + whoami, get_shard_services(), + *monc, *hb_front_msgr, *hb_back_msgr}); + return store.mount().handle_error( + crimson::stateful_ec::assert_failure([FNAME] (const auto& ec) { + ERROR("error mounting object store in {}: ({}) {}", + local_conf().get_val("osd_data"), + ec.value(), ec.message()); + })); }).then([this, FNAME] { auto stats_seconds = local_conf().get_val("crimson_osd_stat_interval"); if (stats_seconds > 0) { @@ -407,16 +417,6 @@ seastar::future<> OSD::start() stats_timer.arm_periodic(std::chrono::seconds(stats_seconds)); } - heartbeat.reset(new Heartbeat{ - whoami, get_shard_services(), - *monc, *hb_front_msgr, *hb_back_msgr}); - return store.mount().handle_error( - crimson::stateful_ec::assert_failure([FNAME] (const auto& ec) { - ERROR("error mounting object store in {}: ({}) {}", - local_conf().get_val("osd_data"), - ec.value(), ec.message()); - })); - }).then([this] { return open_meta_coll(); }).then([this] { return pg_shard_manager.get_meta_coll().load_superblock(