From: Samuel Just Date: Tue, 25 Sep 2012 18:07:07 +0000 (-0700) Subject: PG: last_complete might be outside of the log X-Git-Tag: v0.53~33 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=0a2f8278508345e06c63136b8bbbcf5d01641c84;p=ceph.git PG: last_complete might be outside of the log When we encounter a divergent log entry, we put the object into the missing set at the prior_version for the divergent event. Unfortunately, the event at prior_version might have been trimmed leaving the missing set with an item with a need prior to log_tail. Thus, last_complete also ends up being prior to log_tail. Caused #3208. There is another bug related to this one: #3213. Signed-off-by: Samuel Just --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index cfb080e210173..e004a414cc38e 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -1344,7 +1344,6 @@ void PG::activate(ObjectStore::Transaction& t, if (role == 0) { // primary state last_update_ondisk = info.last_update; min_last_complete_ondisk = eversion_t(0,0); // we don't know (yet)! - assert(info.last_complete >= log.tail); } last_update_applied = info.last_update; @@ -5381,7 +5380,6 @@ boost::statechart::result PG::RecoveryState::ReplicaActive::react(const MLogRec& pg->merge_log(*context().get_cur_transaction(), logevt.msg->info, logevt.msg->log, logevt.from); - assert(pg->log.tail <= pg->info.last_complete); assert(pg->log.head == pg->info.last_update); return discard_event(); @@ -5461,7 +5459,6 @@ boost::statechart::result PG::RecoveryState::Stray::react(const MLogRec& logevt) msg->info, msg->log, logevt.from); } - assert(pg->log.tail <= pg->info.last_complete); assert(pg->log.head == pg->info.last_update); post_event(Activate(logevt.msg->get_epoch())); @@ -5481,7 +5478,6 @@ boost::statechart::result PG::RecoveryState::Stray::react(const MInfoRec& infoev } assert(infoevt.info.last_update == pg->info.last_update); - assert(pg->log.tail <= pg->info.last_complete); assert(pg->log.head == pg->info.last_update); post_event(Activate(infoevt.msg_epoch));