From: Samuel Just Date: Sat, 29 Oct 2016 22:00:57 +0000 (-0700) Subject: ReplicatedPG: we might actually recover an object past crt on repair X-Git-Tag: v11.1.0~245^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d8e0965cc657586650da2e338044ac041715a839;p=ceph.git ReplicatedPG: we might actually recover an object past crt on repair Signed-off-by: Samuel Just --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 773dd8e7deb2..418a15875d9c 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -362,6 +362,15 @@ void ReplicatedPG::on_local_recover( // keep track of active pushes for scrub ++active_pushes; + if (recovery_info.version > pg_log.get_can_rollback_to()) { + /* This can only happen during a repair, and even then, it would + * be one heck of a race. If we are repairing the object, the + * write in question must be fully committed, so it's not valid + * to roll it back anyway (and we'll be rolled forward shortly + * anyway) */ + PGLogEntryHandler h{this, t}; + pg_log.roll_forward_to(recovery_info.version, &h); + } recover_got(recovery_info.soid, recovery_info.version); if (is_primary()) {