]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PG: last_complete might be outside of the log
authorSamuel Just <sam.just@inktank.com>
Tue, 25 Sep 2012 18:07:07 +0000 (11:07 -0700)
committerSage Weil <sage@inktank.com>
Thu, 27 Sep 2012 20:20:35 +0000 (13:20 -0700)
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 <sam.just@inktank.com>
src/osd/PG.cc

index cfb080e2101732ba323324dc5fdd243f2bd9259a..e004a414cc38ed4d1ad4a5e5f986c937b3955846 100644 (file)
@@ -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<RecoveryMachine>().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));