summaryrefslogtreecommitdiffstats
path: root/src/rgw/driver/rados/rgw_rados.cc
diff options
context:
space:
mode:
authorCasey Bodley <cbodley@users.noreply.github.com>2024-07-03 16:02:55 +0200
committerGitHub <noreply@github.com>2024-07-03 16:02:55 +0200
commitcdc2779dae87082a074c0a11f90f236b612d4dac (patch)
treea800032569304097be613c34e91aae1c77024a24 /src/rgw/driver/rados/rgw_rados.cc
parentMerge pull request #57985 from thotz/add-storage-adminops-api (diff)
parentrgw: correct tag checking logic in bucket_exports_object (diff)
downloadceph-cdc2779dae87082a074c0a11f90f236b612d4dac.tar.xz
ceph-cdc2779dae87082a074c0a11f90f236b612d4dac.zip
Merge pull request #57060 from awojno-bloomberg/wip-awojno-status-header
rgw: implement x-amz-replication-status for PENDING & COMPLETED Reviewed-by: Shilpa Jagannath <smanjara@redhat.com> Reviewed-by: Casey Bodley <cbodley@redhat.com>
Diffstat (limited to 'src/rgw/driver/rados/rgw_rados.cc')
-rw-r--r--src/rgw/driver/rados/rgw_rados.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/rgw/driver/rados/rgw_rados.cc b/src/rgw/driver/rados/rgw_rados.cc
index ce35ed20be4..5e0f2c30ca9 100644
--- a/src/rgw/driver/rados/rgw_rados.cc
+++ b/src/rgw/driver/rados/rgw_rados.cc
@@ -5473,7 +5473,7 @@ static int resync_encrypted_multipart(const DoutPrefixProvider* dpp,
};
return store->set_attrs(dpp, &obj_ctx, bucket_info, state.obj,
- add_attrs, nullptr, y, set_mtime);
+ add_attrs, nullptr, y, true, set_mtime);
}
static void try_resync_encrypted_multipart(const DoutPrefixProvider* dpp,
@@ -6479,13 +6479,14 @@ int RGWRados::set_attr(const DoutPrefixProvider *dpp, RGWObjectCtx* octx, RGWBuc
{
map<string, bufferlist> attrs;
attrs[name] = bl;
- return set_attrs(dpp, octx, bucket_info, obj, attrs, NULL, y);
+ return set_attrs(dpp, octx, bucket_info, obj, attrs, NULL, y, true);
}
int RGWRados::set_attrs(const DoutPrefixProvider *dpp, RGWObjectCtx* octx, RGWBucketInfo& bucket_info, const rgw_obj& src_obj,
map<string, bufferlist>& attrs,
map<string, bufferlist>* rmattrs,
optional_yield y,
+ bool log_op,
ceph::real_time set_mtime /* = zero() */)
{
rgw_obj obj = src_obj;
@@ -6557,7 +6558,7 @@ int RGWRados::set_attrs(const DoutPrefixProvider *dpp, RGWObjectCtx* octx, RGWBu
string tag;
append_rand_alpha(cct, tag, tag, 32);
state->write_tag = tag;
- r = index_op.prepare(dpp, CLS_RGW_OP_ADD, &state->write_tag, y);
+ r = index_op.prepare(dpp, CLS_RGW_OP_ADD, &state->write_tag, y, log_op);
if (r < 0)
return r;
@@ -6601,9 +6602,9 @@ int RGWRados::set_attrs(const DoutPrefixProvider *dpp, RGWObjectCtx* octx, RGWBu
int64_t poolid = ioctx.get_id();
r = index_op.complete(dpp, poolid, epoch, state->size, state->accounted_size,
mtime, etag, content_type, storage_class, owner,
- RGWObjCategory::Main, nullptr, y);
+ RGWObjCategory::Main, nullptr, y, nullptr, false, log_op);
} else {
- int ret = index_op.cancel(dpp, nullptr, y);
+ int ret = index_op.cancel(dpp, nullptr, y, log_op);
if (ret < 0) {
ldpp_dout(dpp, 0) << "ERROR: complete_update_index_cancel() returned ret=" << ret << dendl;
}