]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
PG: compensate for bug 10780 on older peers 3768/head
authorSamuel Just <sjust@redhat.com>
Tue, 17 Feb 2015 18:08:01 +0000 (10:08 -0800)
committerSamuel Just <sjust@redhat.com>
Wed, 18 Feb 2015 23:09:58 +0000 (15:09 -0800)
Previously, there was a harmless bug where we didn't fill in the
last_epoch_started field for a peer which we are resetting the
last_backfill line for.  It's no longer harmless since we use that
as the activation epoch, so if the peer is missing the MIN_SIZE
feature bit, we fill in the last_epoch_started it meant to fill in.

Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/PG.cc

index b2f46f6a32551a75453f5c8d10ad547e061c727b..ac3fb45521e38cff964c8ca4c18ffefcede4958f 100644 (file)
@@ -6714,6 +6714,12 @@ boost::statechart::result PG::RecoveryState::Stray::react(const MLogRec& logevt)
 
   ObjectStore::Transaction* t = context<RecoveryMachine>().get_cur_transaction();
   if (msg->info.last_backfill == hobject_t()) {
+    if (!(msg->get_connection()->get_features() & CEPH_FEATURE_OSD_MIN_SIZE_RECOVERY)) {
+      dout(10) << "Got logevt resetting backfill from peer featuring bug"
+              << " 10780, setting msg->info.last_epoch_started to logevt.query_epoch,"
+              << " which is the activation epoch." << dendl;
+      msg->info.last_epoch_started = msg->get_query_epoch();
+    }
     // restart backfill
     pg->unreg_next_scrub();
     pg->info = msg->info;