summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Just <sam.just@inktank.com>2014-03-14 02:16:19 +0100
committerSamuel Just <sam.just@inktank.com>2014-03-14 18:57:47 +0100
commit62af51cb780cb03c51da92591c79a2cec893dee8 (patch)
treed36f5b8824e871f34bc04daec98a3ab5d8373a26
parentosd_types: print lb if incomplete even if empty (diff)
downloadceph-62af51cb780cb03c51da92591c79a2cec893dee8.tar.xz
ceph-62af51cb780cb03c51da92591c79a2cec893dee8.zip
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 <sam.just@inktank.com>
-rw-r--r--src/osd/PG.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/osd/PG.cc b/src/osd/PG.cc
index fe759efe142..aeec9d655a4 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