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: v12.2.9~134^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d08f0aec86ecd9b23310f1c41f9cb9060f10bc6b;p=ceph.git osd: allow trim() to proceed when there are missing items Signed-off-by: Neha Ojha (cherry picked from commit de42fee0dff299f4d0377961d05e02fd8f49f21b) Conflicts: src/osd/PGLog.cc: The async recovery feature is not present in luminous. Remove async recovery requirements from this commit. --- diff --git a/src/osd/PGLog.cc b/src/osd/PGLog.cc index 8148f57a152c..b3fc17a89702 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 backfill_targets - if (transaction_applied) + // or whenever there are missing items + if (transaction_applied && (missing.num_missing() == 0)) assert(trim_to <= info.last_complete); dout(10) << "trim " << log << " to " << trim_to << dendl;