From: Sage Weil Date: Fri, 7 May 2010 18:53:03 +0000 (-0700) Subject: osd: remove bad assert in get_object_context() X-Git-Tag: v0.20.1~12 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e5ab4c81cf6b690774eca466dce05c7b82d19bbf;p=ceph.git osd: remove bad assert in get_object_context() This has always been fishy, and it's original purpose isn't quite clear. The '!obc->obs.ssc' is clearly the create case, but the head_exists check is only the case if we are getting the context for a _head, which in many cases we're not. In parituclarly, it fails for a snapped object where the head doesn't exist. We _do_ have teh ssc (from the _snapdir object) but there is no head. Just remove the assert entirely.. it's not clear what it's really catching. --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 56a075152c2..f6e020efd50 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -2075,7 +2075,6 @@ ReplicatedPG::ObjectContext *ReplicatedPG::get_object_context(const sobject_t& s if (r >= 0) { obc->obs.oi.decode(bv); obc->obs.exists = true; - assert(!obc->obs.ssc || obc->obs.ssc->snapset.head_exists); } else { obc->obs.exists = false; }