From 7eadf88b736b2164f94cd8d7604701c67cf446cc Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Mon, 30 Mar 2015 15:28:03 -0700 Subject: [PATCH] PGLog::merge_log: update missing, after removing divergent This should not change behavior at all. It'll be useful in the next few commits. Signed-off-by: Samuel Just --- src/osd/PGLog.cc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/osd/PGLog.cc b/src/osd/PGLog.cc index f1eb53c6cc775..c38e3a5275a11 100644 --- a/src/osd/PGLog.cc +++ b/src/osd/PGLog.cc @@ -656,18 +656,6 @@ void PGLog::merge_log(ObjectStore::Transaction& t, } mark_dirty_from(lower_bound); - // index, update missing, delete deleted - for (list::iterator p = from; p != to; ++p) { - pg_log_entry_t &ne = *p; - dout(20) << "merge_log " << ne << dendl; - log.index(ne); - if (cmp(ne.soid, info.last_backfill, info.last_backfill_bitwise) <= 0) { - missing.add_next_event(ne); - if (ne.is_delete()) - rollbacker->remove(ne.soid); - } - } - // move aside divergent items list divergent; while (!log.empty()) { @@ -687,6 +675,18 @@ void PGLog::merge_log(ObjectStore::Transaction& t, log.log.pop_back(); } + // index, update missing, delete deleted + for (list::iterator p = from; p != to; ++p) { + pg_log_entry_t &ne = *p; + ldpp_dout(dpp, 20) "merge_log " << ne << dendl; + log.index(ne); + if (ne.soid <= info.last_backfill) { + missing.add_next_event(ne); + if (ne.is_delete()) + rollbacker->remove(ne.soid); + } + } + // splice log.log.splice(log.log.end(), olog.log, from, to); -- 2.39.5