]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG::finish_ctx: clear object_info if !obs.exists
authorSamuel Just <sam.just@inktank.com>
Fri, 7 Mar 2014 23:54:23 +0000 (15:54 -0800)
committerSage Weil <sage@inktank.com>
Sun, 9 Mar 2014 19:22:12 +0000 (12:22 -0700)
Otherwise, we see a different object_info_t depending on whether the
transaction deleting the object clears before another op recreating it appears.
In particular, we use oi.version to set the prior_version on the log entries in
finish_ctx.  If the oi is allowed to stick around the recreation log event will
have a prior version of the deletion event when it should have a prior version
of eversion_t().

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

index e38b2e9ea34b7bcea0edcadfe7c7f623fea77e04..8ea8a624850c121637b26067ab7ce2b38a6f0da1 100644 (file)
@@ -5092,6 +5092,8 @@ void ReplicatedPG::finish_ctx(OpContext *ctx, int log_op_type)
     } else {
       dout(10) << " no snapset (this is a clone)" << dendl;
     }
+  } else {
+    ctx->new_obs.oi = object_info_t(ctx->obc->obs.oi.soid);
   }
 
   // append to log