We do want PROMOTE to be able to atomically replace
a redirect with the actual object, so the solution
is to clear the redirect at the end of the promote.
Signed-off-by: Myoungwon Oh <myoungwon.oh@samsumg.com>
tctx->extra_reqids = results->reqids;
tctx->extra_reqid_return_codes = results->reqid_return_codes;
+ if (obc->obs.oi.has_manifest() && obc->obs.oi.manifest.is_redirect()) {
+ tctx->new_obs.oi.manifest.type = object_manifest_t::TYPE_NONE;
+ tctx->new_obs.oi.clear_flag(object_info_t::FLAG_REDIRECT_HAS_REFERENCE);
+ tctx->new_obs.oi.clear_flag(object_info_t::FLAG_MANIFEST);
+ tctx->new_obs.oi.manifest.redirect_target = hobject_t();
+ tctx->delta_stats.num_objects_manifest--;
+ if (obc->obs.oi.test_flag(object_info_t::FLAG_REDIRECT_HAS_REFERENCE)) {
+ dec_all_refcount_manifest(obc->obs.oi, tctx.get());
+ }
+ }
+
if (whiteout) {
// create a whiteout
tctx->op_t->create(soid);