From: Samuel Just Date: Fri, 2 Nov 2012 21:13:33 +0000 (-0700) Subject: PG::merge_old_entry: fix case for divergent prior_version X-Git-Tag: v0.54~20 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=342c2c70770256ee519401f2d5637d2fcb8f115a;p=ceph.git PG::merge_old_entry: fix case for divergent prior_version 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 Reviewed-by: Sage Weil --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 7799ceec1cb..51dae5458f1 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -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))