]> 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>
Fri, 18 Jan 2019 19:06:13 +0000 (14:06 -0500)
Signed-off-by: Neha Ojha <nojha@redhat.com>
(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.

src/osd/PGLog.cc

index 8148f57a152c5bdbf91cec637eadb2e551a98431..b3fc17a897022d2b14c7942d99262c9af4e0ba79 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 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;