From 0a2f8278508345e06c63136b8bbbcf5d01641c84 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Tue, 25 Sep 2012 11:07:07 -0700 Subject: [PATCH] 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 --- src/osd/PG.cc | 4 ---- 1 file changed, 4 deletions(-) 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)); -- 2.39.5