]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PG::merge_old_entry: fix case for divergent prior_version
authorSamuel Just <sam.just@inktank.com>
Fri, 2 Nov 2012 21:13:33 +0000 (14:13 -0700)
committerSage Weil <sage@inktank.com>
Sun, 4 Nov 2012 14:16:36 +0000 (06:16 -0800)
Previously, we asserted that a log entry with a divergent
prior_version must be a clone.  Consider the following
case:

6'11(6'2)  m foo
7'12(6'3) m bar
7'13(7'12) m bar

If this is merged with:

6'11(6'2)  m foo
8'12(6'4) m baz

we will hit the assert.  The correct behavior is simply to remove
the object as in the clone case.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
src/osd/PG.cc

index 7799ceec1cb05fcdb7ab56dc13f0fb1b42229e31..51dae5458f11da7f9ccd0fbdf03fb407693f4061 100644 (file)
@@ -384,9 +384,8 @@ bool PG::merge_old_entry(ObjectStore::Transaction& t, pg_log_entry_t& oe)
       }
     }
   } else if (oe.prior_version > info.log_tail) {
-    assert(oe.soid.snap != CEPH_NOSNAP);
     dout(20) << "merge_old_entry  had " << oe
-            << ", clone with no non-divergent log entries, "
+            << ", object with no non-divergent log entries, "
             << "deleting" << dendl;
     remove_object_with_snap_hardlinks(t, oe.soid);
     if (missing.is_missing(oe.soid))