]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix log tail vs last_complete assert on replica activation
authorSage Weil <sage@newdream.net>
Wed, 1 Dec 2010 23:40:28 +0000 (15:40 -0800)
committerSage Weil <sage@newdream.net>
Wed, 1 Dec 2010 23:40:28 +0000 (15:40 -0800)
The last_complete may be below the log tail IFF we have a backlog.

Fixes 756918be3b24d8164699da301ddfbc8e6fd6b751.

Signed-off-by: Sage Weil <sage@newdream.net>
src/osd/OSD.cc

index 0be95ff57ea30a15ed1497025f97b5ac09d28959..5b260dd93a6d4cac8aecbedda6a29e1c2c170f72 100644 (file)
@@ -3979,7 +3979,7 @@ void OSD::_process_pg_info(epoch_t epoch, int from,
       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.tail <= pg->info.last_complete || pg->log.backlog);
       assert(pg->log.head == pg->info.last_update);
 
       pg->activate(*t, fin->contexts, info_map);