1
0
mirror of https://github.com/ceph/ceph synced 2025-04-01 14:51:13 +00:00

osd: fix merge_log divergent item detection

An item in our log isn't divergent if it is below the bottom of
olog.  Using the last_kept item isn't helpful here because
last_kept is in olog, and may be below that log's bottom.
This commit is contained in:
Sage Weil 2008-12-05 11:46:55 -08:00
parent 34ee473dcf
commit c1368ed107

View File

@ -441,7 +441,8 @@ void PG::merge_log(ObjectStore::Transaction& t, Info &oinfo, Log &olog, Missing
if (last_kept != olog.log.end()) {
while (1) {
Log::Entry &oe = *log.log.rbegin();
if (oe.version == last_kept->version)
if (oe.version == last_kept->version ||
oe.version <= olog.bottom)
break;
dout(10) << "merge_log divergent " << oe << dendl;
divergent.push_front(oe);