From d6e268906a67b64380e866fe6f79b73a8899223e Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Tue, 17 Feb 2015 10:08:01 -0800 Subject: [PATCH] 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 --- src/osd/PG.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index b2f46f6a32551..ac3fb45521e38 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; -- 2.47.3