From 62af51cb780cb03c51da92591c79a2cec893dee8 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Thu, 13 Mar 2014 18:16:19 -0700 Subject: [PATCH] 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 --- src/osd/PG.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 -- 2.47.3