]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "ReplicatedPG: disallow trans which atomically create and remove an object"
authorSage Weil <sage@inktank.com>
Fri, 21 Mar 2014 18:57:03 +0000 (11:57 -0700)
committerSage Weil <sage@inktank.com>
Fri, 21 Mar 2014 18:57:03 +0000 (11:57 -0700)
This reverts commit 9ee108428176c93fe48ae5ae95b160eadabca9b6.

This appears to break rgw in its current state; test and fix soon.

src/osd/ReplicatedPG.cc

index 86c674f8f9a0aa3e84d8b98876f642ddfe84e2d2..f0987bf8ba5043f3ce1b07f6d3332eb8ef5e50d1 100644 (file)
@@ -4948,12 +4948,6 @@ int ReplicatedPG::prepare_transaction(OpContext *ctx)
     return result;
   }
 
-  if (!ctx->new_obs.exists && !ctx->obs->exists) {
-    // We can't really represent in the log an operation which atomically
-    // creates and removes an object
-    return -EINVAL;
-  }
-
   // cache: clear whiteout?
   if (pool.info.cache_mode == pg_pool_t::CACHEMODE_WRITEBACK) {
     if (ctx->user_modify &&
@@ -5015,9 +5009,6 @@ void ReplicatedPG::finish_ctx(OpContext *ctx, int log_op_type)
        }
       }
     } else if (ctx->new_snapset.clones.size()) {
-      // see do_op, if !new_obs.exist && !obs->exists, we returned EINVAL already
-      assert(ctx->obs->exists);
-
       // save snapset on _snap
       hobject_t snapoid(soid.oid, soid.get_key(), CEPH_SNAPDIR, soid.hash,
                        info.pgid.pool(), soid.get_namespace());