if ent_list is not cleared, the old element will be checked repeatedly
and will occupy more memory.
Fixes: http://tracker.ceph.com/issues/44394
Signed-off-by: Yao Zongyou <yaozongyou@vip.qq.com>
(cherry picked from commit
f63bf47aa464c345c907c748dfdbbc5a239d8488)
int RGWRados::check_bucket_empty(RGWBucketInfo& bucket_info)
{
- std::vector<rgw_bucket_dir_entry> ent_list;
rgw_obj_index_key marker;
string prefix;
bool is_truncated;
do {
+ std::vector<rgw_bucket_dir_entry> ent_list;
constexpr uint NUM_ENTRIES = 1000u;
int r = cls_bucket_list_unordered(bucket_info,
RGW_NO_SHARD,