]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PG::find_best_info: reject infos with old last_epoch_started
authorSamuel Just <sjust@redhat.com>
Thu, 19 Mar 2015 00:42:40 +0000 (17:42 -0700)
committerSamuel Just <sjust@redhat.com>
Thu, 19 Mar 2015 22:30:41 +0000 (15:30 -0700)
See doc/dev/osd_internals/last_epoch_started.rst

Reviewed-by: Sage Weil <sage@redhat.com>
Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/PG.cc

index e99fb790af8240d5447339e4f4f6bfb9557599a1..49d8f69f564359069344757abe479a98b2e8e533 100644 (file)
@@ -925,6 +925,9 @@ map<pg_shard_t, pg_info_t>::const_iterator PG::find_best_info(
     // Only consider peers with last_update >= min_last_update_acceptable
     if (p->second.last_update < min_last_update_acceptable)
       continue;
+    // disqualify anyone with a too old last_epoch_started
+    if (p->second.last_epoch_started < max_last_epoch_started_found)
+      continue;
     // Disquality anyone who is incomplete (not fully backfilled)
     if (p->second.is_incomplete())
       continue;