From: Neha Ojha Date: Mon, 16 Jul 2018 23:48:58 +0000 (-0700) Subject: osd: allow trim() to proceed when there are missing items X-Git-Tag: v14.0.1~843^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=de42fee0dff299f4d0377961d05e02fd8f49f21b;p=ceph.git osd: allow trim() to proceed when there are missing items Signed-off-by: Neha Ojha --- diff --git a/src/osd/PGLog.cc b/src/osd/PGLog.cc index ef9426613e660..7bad3503ce8f6 100644 --- a/src/osd/PGLog.cc +++ b/src/osd/PGLog.cc @@ -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;