]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: _process_pg_info: add assert for replicas
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Mon, 29 Nov 2010 17:29:17 +0000 (09:29 -0800)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Mon, 29 Nov 2010 17:48:26 +0000 (09:48 -0800)
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
src/osd/OSD.cc

index 3598b4250edc67b80cd6cd0cfcf48372b6c8f29d..f2474e82c6a1ac45233fca2dcce62e8990b7c4bf 100644 (file)
@@ -3943,6 +3943,11 @@ void OSD::_process_pg_info(epoch_t epoch, int from,
       // INACTIVE REPLICA
       assert(from == pg->acting[0]);
       pg->merge_log(*t, info, log, from);
+
+      // We should have the right logs before activating.
+      assert(pg->log.tail <= pg->info.last_complete);
+      assert(pg->log.head == pg->info.last_update);
+
       pg->activate(*t, fin->contexts, info_map);
     } else {
       // ACTIVE REPLICA