changed = true;
}
+ if (oinfo.stats.reported < info.stats.reported) // make sure reported always increases
+ oinfo.stats.reported = info.stats.reported;
+ if (info.last_backfill.is_max())
+ info.stats = oinfo.stats;
+
// do we have divergent entries to throw out?
if (olog.head < log.head) {
rewind_divergent_log(t, olog.head);
log.index();
info.last_update = log.head = olog.head;
- if (oinfo.stats.reported < info.stats.reported) // make sure reported always increases
- oinfo.stats.reported = info.stats.reported;
- if (info.last_backfill.is_max())
- info.stats = oinfo.stats;
// process divergent items
if (!divergent.empty()) {
pg_missing_t& omissing, int from);
bool proc_replica_info(int from, const pg_info_t &info);
bool merge_old_entry(ObjectStore::Transaction& t, pg_log_entry_t& oe);
+
+ /**
+ * Merges authoratative log/info into current log/info/store
+ *
+ * @param [in,out] t used to delete obsolete objects
+ * @param [in,out] oinfo recieved authoritative info
+ * @param [in,out] olog recieved authoritative log
+ * @param [in] from peer which sent the information
+ */
void merge_log(ObjectStore::Transaction& t, pg_info_t &oinfo, pg_log_t &olog, int from);
void rewind_divergent_log(ObjectStore::Transaction& t, eversion_t newhead);
bool search_for_missing(const pg_info_t &oinfo, const pg_missing_t *omissing,