From: Samuel Just Date: Fri, 7 Mar 2014 23:54:23 +0000 (-0800) Subject: ReplicatedPG::finish_ctx: clear object_info if !obs.exists X-Git-Tag: v0.78~58 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=83731a75d7f29778dafff5e08a3ebc5da1498665;p=ceph.git ReplicatedPG::finish_ctx: clear object_info if !obs.exists 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 Reviewed-by: Sage Weil --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index e38b2e9ea34b..8ea8a624850c 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -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