mirror of
https://github.com/ceph/ceph
synced 2024-12-24 04:14:07 +00:00
PG::proc_replica_log: oinfo.last_complete must be *before* first entry in omissing
Fixes: #4189 Signed-off-by: Samuel Just <sam.just@inktank.com>
This commit is contained in:
parent
e4fd70fcec
commit
2dae6a68ee
@ -275,10 +275,23 @@ void PG::proc_replica_log(ObjectStore::Transaction& t,
|
||||
if (lu < oinfo.last_update) {
|
||||
dout(10) << " peer osd." << from << " last_update now " << lu << dendl;
|
||||
oinfo.last_update = lu;
|
||||
if (lu < oinfo.last_complete)
|
||||
oinfo.last_complete = lu;
|
||||
if (omissing.have_missing())
|
||||
oinfo.last_complete = omissing.missing[omissing.rmissing.begin()->second].need;
|
||||
}
|
||||
|
||||
if (omissing.have_missing()) {
|
||||
eversion_t first_missing =
|
||||
omissing.missing[omissing.rmissing.begin()->second].need;
|
||||
oinfo.last_complete = eversion_t();
|
||||
list<pg_log_entry_t>::const_iterator i = olog.log.begin();
|
||||
for (;
|
||||
i != olog.log.end();
|
||||
++i) {
|
||||
if (i->version < first_missing)
|
||||
oinfo.last_complete = i->version;
|
||||
else
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
oinfo.last_complete = oinfo.last_update;
|
||||
}
|
||||
|
||||
peer_info[from] = oinfo;
|
||||
|
Loading…
Reference in New Issue
Block a user