]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: remove bad assert in get_object_context()
authorSage Weil <sage@newdream.net>
Fri, 7 May 2010 18:53:03 +0000 (11:53 -0700)
committerSage Weil <sage@newdream.net>
Fri, 7 May 2010 18:58:21 +0000 (11:58 -0700)
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.

src/osd/ReplicatedPG.cc

index e49ae1266082007759d95696563f57ed67b0d6c7..e6f1fcf29c60a7d9cdabf2c0fa805a52d0ffb6ab 100644 (file)
@@ -2095,7 +2095,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;
     }