crimson/osd: rename heartbeat_timer to tick_timer

Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
This commit is contained in:
Xuehan Xu 2020-11-01 11:29:57 +08:00
parent 8b7d0ae035
commit 471531e25d
2 changed files with 4 additions and 4 deletions

View File

@ -89,7 +89,7 @@ OSD::OSD(int id, uint32_t nonce,
shard_services{*this, whoami, *cluster_msgr, *public_msgr, *monc, *mgrc, *store},
heartbeat{new Heartbeat{whoami, shard_services, *monc, hb_front_msgr, hb_back_msgr}},
// do this in background
heartbeat_timer{[this] { update_heartbeat_peers(); }},
tick_timer{[this] { update_heartbeat_peers(); }},
asok{seastar::make_lw_shared<crimson::admin::AdminSocket>()},
osdmap_gate("OSD::osdmap_gate", std::make_optional(std::ref(shard_services)))
{
@ -1038,7 +1038,7 @@ seastar::future<> OSD::committed_osd_maps(version_t first,
state.set_active();
beacon_timer.arm_periodic(
std::chrono::seconds(local_conf()->osd_beacon_report_interval));
heartbeat_timer.arm_periodic(
tick_timer.arm_periodic(
std::chrono::seconds(TICK_INTERVAL));
}
} else if (!osdmap->is_up(whoami)) {
@ -1205,7 +1205,7 @@ bool OSD::should_restart() const
seastar::future<> OSD::restart()
{
beacon_timer.cancel();
heartbeat_timer.cancel();
tick_timer.cancel();
up_epoch = 0;
bind_epoch = osdmap->get_epoch();
// TODO: promote to shutdown if being marked down for multiple times

View File

@ -115,7 +115,7 @@ class OSD final : public crimson::net::Dispatcher,
crimson::osd::ShardServices shard_services;
std::unique_ptr<Heartbeat> heartbeat;
seastar::timer<seastar::lowres_clock> heartbeat_timer;
seastar::timer<seastar::lowres_clock> tick_timer;
// admin-socket
seastar::lw_shared_ptr<crimson::admin::AdminSocket> asok;