]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/ReplicatedPG: assert map and set sort order is correct during backfill
authorSage Weil <sage@redhat.com>
Fri, 24 Jul 2015 15:46:09 +0000 (11:46 -0400)
committerSage Weil <sage@redhat.com>
Fri, 7 Aug 2015 14:16:06 +0000 (10:16 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/ReplicatedPG.cc

index 1bfa68b22b630281460740e28de52789aa140805..34684ddabd4722c0fcdb759e3b1f9ab5dcd6cca4 100644 (file)
@@ -9669,6 +9669,18 @@ int ReplicatedPG::recover_backfill(
       hobject_t::Comparator(get_sort_bitwise()));
   }
 
+  // sanity check sort orders
+  assert(backfill_info.sort_bitwise == get_sort_bitwise());
+  for (map<pg_shard_t, BackfillInterval>::iterator i =
+        peer_backfill_info.begin();
+       i != peer_backfill_info.end();
+       ++i) {
+    assert(i->second.sort_bitwise == get_sort_bitwise());
+    assert(i->second.objects.key_comp().bitwise == get_sort_bitwise());
+  }
+  assert(backfills_in_flight.key_comp().bitwise == get_sort_bitwise());
+  assert(pending_backfill_updates.key_comp().bitwise == get_sort_bitwise());
+
   for (set<pg_shard_t>::iterator i = backfill_targets.begin();
        i != backfill_targets.end();
        ++i) {