From: Samuel Just Date: Fri, 14 Mar 2014 01:16:19 +0000 (-0700) Subject: PG::activate: handle peer contigious with primary, but not auth_log X-Git-Tag: v0.78~21^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=62af51cb780cb03c51da92591c79a2cec893dee8;p=ceph.git PG::activate: handle peer contigious with primary, but not auth_log The added case covers a situation where a replica is not contiguous with the auth_log, but is contiguous with the primary. Reshuffling the active set to handle this would be tricky, so instead we just go ahead and backfill it anyway. This is probably preferrable in any case since the replica in question would have to be significantly behind. Fixes: #7696 Signed-off-by: Samuel Just --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index fe759efe1422..aeec9d655a4e 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -1514,7 +1514,17 @@ void PG::activate(ObjectStore::Transaction& t, i->shard, pg_whoami.shard, get_osdmap()->get_epoch(), info); } - } else if (pg_log.get_tail() > pi.last_update || pi.last_backfill == hobject_t()) { + } else if ( + pg_log.get_tail() > pi.last_update || + pi.last_backfill == hobject_t() || + (backfill_targets.count(*i) && pi.last_backfill.is_max())) { + /* This last case covers a situation where a replica is not contiguous + * with the auth_log, but is contiguous with this replica. Reshuffling + * the active set to handle this would be tricky, so instead we just go + * ahead and backfill it anyway. This is probably preferrable in any + * case since the replica in question would have to be significantly + * behind. + */ // backfill osd->clog.info() << info.pgid << " restarting backfill on osd." << peer << " from (" << pi.log_tail << "," << pi.last_update << "] " << pi.last_backfill