]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: allow trim() to proceed when there are missing items
authorNeha Ojha <nojha@redhat.com>
Mon, 16 Jul 2018 23:48:58 +0000 (16:48 -0700)
committerNeha Ojha <nojha@redhat.com>
Mon, 16 Jul 2018 23:48:58 +0000 (16:48 -0700)
Signed-off-by: Neha Ojha <nojha@redhat.com>
src/osd/PGLog.cc

index ef9426613e660f582dabccc65d26bc91ce384f0b..7bad3503ce8f6c6c0d1a7522d3abbb3b4deec93f 100644 (file)
@@ -168,8 +168,10 @@ void PGLog::trim(
   dout(10) << __func__ << " proposed trim_to = " << trim_to << dendl;
   // trim?
   if (trim_to > log.tail) {
+    dout(10) << __func__ << " missing = " << missing.num_missing() << dendl;
     // Don't assert for async_recovery_targets or backfill_targets
-    if (transaction_applied && !async)
+    // or whenever there are missing items
+    if (transaction_applied && !async && (missing.num_missing() == 0))
       assert(trim_to <= info.last_complete);
 
     dout(10) << "trim " << log << " to " << trim_to << dendl;