diff options
author | Jane Zhu <jzhu116@bloomberg.net> | 2024-01-19 22:31:50 +0100 |
---|---|---|
committer | Juan Zhu <jzhu4@dev-10-34-20-139.pw1.bcc.bloomberg.com> | 2024-01-22 19:15:29 +0100 |
commit | 6383093e2731c2aec87b5ab286f48dc161edea37 (patch) | |
tree | 977d28802b44c2f36093f2679d3e542009503ce1 /src/cls | |
parent | Merge pull request #55070 from pdvian/wip-fix-progressevent (diff) | |
download | ceph-6383093e2731c2aec87b5ab286f48dc161edea37.tar.xz ceph-6383093e2731c2aec87b5ab286f48dc161edea37.zip |
rgw/multisite: avoid writing multipart parts to the bucket index log
Signed-off-by: Juan Zhu <jzhu4@dev-10-34-20-139.pw1.bcc.bloomberg.com>
Diffstat (limited to 'src/cls')
-rw-r--r-- | src/cls/rgw/cls_rgw.cc | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/cls/rgw/cls_rgw.cc b/src/cls/rgw/cls_rgw.cc index 034660a11ed..d4350e66751 100644 --- a/src/cls/rgw/cls_rgw.cc +++ b/src/cls/rgw/cls_rgw.cc @@ -963,7 +963,7 @@ static int read_key_entry(cls_method_context_t hctx, const cls_rgw_obj_key& key, // called by rgw_bucket_complete_op() for each item in op.remove_objs static int complete_remove_obj(cls_method_context_t hctx, rgw_bucket_dir_header& header, - const cls_rgw_obj_key& key, bool log_op) + const cls_rgw_obj_key& key) { rgw_bucket_dir_entry entry; string idx; @@ -978,17 +978,6 @@ static int complete_remove_obj(cls_method_context_t hctx, int(entry.meta.category)); unaccount_entry(header, entry); - if (log_op) { - ++header.ver; // increment index version, or we'll overwrite keys previously written - const std::string tag; - ret = log_index_operation(hctx, key, CLS_RGW_OP_DEL, tag, entry.meta.mtime, - entry.ver, CLS_RGW_STATE_COMPLETE, header.ver, - header.max_marker, 0, nullptr, nullptr, nullptr); - if (ret < 0) { - return ret; - } - } - ret = cls_cxx_map_remove_key(hctx, idx); if (ret < 0) { CLS_LOG(1, "%s: cls_cxx_map_remove_key failed with %d", __func__, ret); @@ -1210,7 +1199,7 @@ int rgw_bucket_complete_op(cls_method_context_t hctx, bufferlist *in, bufferlist CLS_LOG_BITX(bitx_inst, 20, "INFO: %s: completing object remove key=%s", __func__, escape_str(remove_key.to_string()).c_str()); - rc = complete_remove_obj(hctx, header, remove_key, default_log_op); + rc = complete_remove_obj(hctx, header, remove_key); if (rc < 0) { CLS_LOG_BITX(bitx_inst, 1, "WARNING: %s: complete_remove_obj, failed to remove entry, " |