From de42fee0dff299f4d0377961d05e02fd8f49f21b Mon Sep 17 00:00:00 2001 From: Neha Ojha Date: Mon, 16 Jul 2018 16:48:58 -0700 Subject: [PATCH] osd: allow trim() to proceed when there are missing items Signed-off-by: Neha Ojha --- src/osd/PGLog.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 2.39.5