Even if the tail != last_update, the log might be empty due to split
moving all entries into other logs.
Fixes: 10718
Signed-off-by: Samuel Just <sjust@redhat.com>
// missing set, as that should already be consistent with our
// current log.
if (olog.tail < log.tail) {
- mark_dirty_to(log.log.begin()->version); // last clean entry
dout(10) << "merge_log extending tail to " << olog.tail << dendl;
list<pg_log_entry_t>::iterator from = olog.log.begin();
list<pg_log_entry_t>::iterator to;
dout(15) << *to << dendl;
}
+ if (to == olog.log.end())
+ mark_dirty_to(oinfo.last_update);
+ else
+ mark_dirty_to(to->version);
// splice into our log.
log.log.splice(log.log.begin(),
olog.log, from, to);