info.last_interval_started = oinfo.last_interval_started;
dirty_info = true;
}
- if (info.history.merge(oinfo.history))
- dirty_info = true;
+ update_history(oinfo.history);
assert(cct->_conf->osd_find_best_info_ignore_history_les ||
info.last_epoch_started >= info.history.last_epoch_started);
assert(is_primary());
peer_info[from] = oinfo;
might_have_unfound.insert(from);
-
- unreg_next_scrub();
- if (info.history.merge(oinfo.history))
- dirty_info = true;
- reg_next_scrub();
+
+ update_history(oinfo.history);
// stray?
if (!is_up(from) && !is_acting(from)) {
}
}
-void PG::update_history_from_master(pg_history_t new_history)
+void PG::update_history(const pg_history_t& new_history)
{
unreg_next_scrub();
- if (info.history.merge(new_history))
+ if (info.history.merge(new_history)) {
+ dout(20) << __func__ << " advanced history from " << new_history << dendl;
dirty_info = true;
+ }
reg_next_scrub();
}
{
assert(!is_primary());
- unreg_next_scrub();
- if (info.history.merge(oinfo.history))
- dirty_info = true;
- reg_next_scrub();
+ update_history(oinfo.history);
if (last_complete_ondisk.epoch >= info.history.last_epoch_started) {
// DEBUG: verify that the snaps are empty in snap_mapper
{
PG *pg = context< RecoveryMachine >().pg;
if (query.query.type == pg_query_t::MISSING) {
- pg->update_history_from_master(query.query.history);
+ pg->update_history(query.query.history);
pg->fulfill_log(query.from, query.query, query.query_epoch);
} // else: from prior to activation, safe to ignore
return discard_event();
PG *pg = context< RecoveryMachine >().pg;
if (query.query.type == pg_query_t::INFO) {
pair<pg_shard_t, pg_info_t> notify_info;
- pg->update_history_from_master(query.query.history);
+ pg->update_history(query.query.history);
pg->fulfill_info(query.from, query.query, notify_info);
context< RecoveryMachine >().send_notify(
notify_info.first,
return deleting || e < get_last_peering_reset();
}
- void update_history_from_master(pg_history_t new_history);
+ void update_history(const pg_history_t& history);
void fulfill_info(pg_shard_t from, const pg_query_t &query,
pair<pg_shard_t, pg_info_t> ¬ify_info);
void fulfill_log(pg_shard_t from, const pg_query_t &query, epoch_t query_epoch);