From: Samuel Just Date: Tue, 17 Feb 2015 18:08:01 +0000 (-0800) Subject: PG: compensate for bug 10780 on older peers X-Git-Tag: v0.93~25^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F3768%2Fhead;p=ceph.git PG: compensate for bug 10780 on older peers 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 --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index b2f46f6a325..ac3fb45521e 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -6714,6 +6714,12 @@ boost::statechart::result PG::RecoveryState::Stray::react(const MLogRec& logevt) ObjectStore::Transaction* t = context().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;