summaryrefslogtreecommitdiffstats
path: root/src/rgw/driver/rados/rgw_rados.h
diff options
context:
space:
mode:
authorliangmingyuan <liangmingyuan@baidu.com>2024-03-26 02:12:08 +0100
committerliangmingyuan <liangmingyuan@baidu.com>2024-07-26 02:50:49 +0200
commit72997836c2fba978b4a5f5cab90df228484b3d83 (patch)
treeb1f01183db0eb260d6e48fa58e6786e89db34e99 /src/rgw/driver/rados/rgw_rados.h
parentreshard: small fix and cleanup (diff)
downloadceph-72997836c2fba978b4a5f5cab90df228484b3d83.tar.xz
ceph-72997836c2fba978b4a5f5cab90df228484b3d83.zip
reshard: guarantee no duplicated index entries exist before starting
reshard There will be duplicated index entries remaining after reshard failed, that can lead to redundant copys in a new reshard process. What's more, if the duplicated entry is deleting operation, and the same entry was written again before a new resharding, the dst index may be deleted wrongly. So duplicated index entries should be cleared after reshard failed and before a new reshard autom automatically. For convenience, rgw-admin can list and purge reshard logsi manually. Signed-off-by: Mingyuan Liang <liangmingyuan@baidu.com>
Diffstat (limited to 'src/rgw/driver/rados/rgw_rados.h')
-rw-r--r--src/rgw/driver/rados/rgw_rados.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rgw/driver/rados/rgw_rados.h b/src/rgw/driver/rados/rgw_rados.h
index a2c55b585d4..713e8f351a4 100644
--- a/src/rgw/driver/rados/rgw_rados.h
+++ b/src/rgw/driver/rados/rgw_rados.h
@@ -1540,6 +1540,8 @@ public:
std::list<rgw_cls_bi_entry> *entries, bool *is_truncated, bool reshardlog, optional_yield y);
int bi_remove(const DoutPrefixProvider *dpp, BucketShard& bs);
+ int trim_reshard_log_entries(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info, optional_yield y);
+
int cls_obj_usage_log_add(const DoutPrefixProvider *dpp, const std::string& oid, rgw_usage_log_info& info, optional_yield y);
int cls_obj_usage_log_read(const DoutPrefixProvider *dpp, const std::string& oid, const std::string& user, const std::string& bucket, uint64_t start_epoch,
uint64_t end_epoch, uint32_t max_entries, std::string& read_iter,