dout(10) << "called " << dendl;
}
+void NVMeofGwMon::cleanup_pending_map()
+{
+ dout(10) << "cleanup pending :" << pending_map << dendl;
+ pending_map.created_gws.clear();
+ pending_map.fsm_timers.clear();
+ pending_map.gw_epoch.clear();
+ pending_map.epoch = 0;
+}
+
void NVMeofGwMon::on_restart()
{
dout(10) << "called " << dendl;
last_beacon.clear();
last_tick = ceph::coarse_mono_clock::now();
+ cleanup_pending_map();
synchronize_last_beacon();
}
NvmeGwMonStates& gw_created_map = created_map_pair.second;
for (auto& gw_created_pair: gw_created_map) {
auto gw_id = gw_created_pair.first;
+ auto& pending_gws_states = pending_map.created_gws[group_key];
+ auto gw_state = pending_gws_states.find(gw_id);
+ if (gw_state == pending_gws_states.end()) {
+ continue;
+ }
if (gw_created_pair.second.allow_failovers_ts > now) {
// restore not persistent information upon new epochs
dout(10) << " restore skip-failovers timeout for gw " << gw_id << dendl;
epoch_t get_ack_map_epoch(bool gw_created, const NvmeGroupKey& group_key);
void recreate_gw_epoch();
void restore_pending_map_info(NVMeofGwMap & tmp_map);
+ void cleanup_pending_map();
};
#endif /* MON_NVMEGWMONITOR_H_ */