]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: restart backfill on peers if last_backfill sort is off
authorSage Weil <sage@redhat.com>
Fri, 17 Jul 2015 18:12:29 +0000 (14:12 -0400)
committerSage Weil <sage@redhat.com>
Fri, 7 Aug 2015 14:16:02 +0000 (10:16 -0400)
If a peer has a last_backfill value but the wrong sort order, we need to
restart backfill at the beginning.

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

index 7696c4ef36a24ede25c1e528bab9dcd195455846..ca6ce719ebf086487cd66319dd786fd3c638e889 100644 (file)
@@ -1626,8 +1626,12 @@ void PG::activate(ObjectStore::Transaction& t,
       } else if (
        pg_log.get_tail() > pi.last_update ||
        pi.last_backfill == hobject_t() ||
+       (pi.last_backfill != hobject_t::get_max() &&
+        pi.last_backfill_bitwise != get_sort_bitwise()) ||
+       /* ^ cover case where peer sort order was different and
+          last_backfill cannot be interpreted */
        (backfill_targets.count(*i) && pi.last_backfill.is_max())) {
-       /* This last case covers a situation where a replica is not contiguous
+       /* 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