From: Peng Zhang Date: Fri, 2 Jul 2021 06:13:50 +0000 (+0800) Subject: rgw: update last_added_entry when count == num_entries X-Git-Tag: v17.1.0~619^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=7511f9f675ea4e43992605dc03109bc5f356a5e1;p=ceph-ci.git rgw: update last_added_entry when count == num_entries RGWRados::cls_bucket_list_unordered() will produce one redundent entry every time is_truncated is true.The issue could be easily reproduced when a bucket is filled with amounts of incomplete multipart upload. To be more specific, the number of incomplete multipart upload objects should be greater than 1100. Signed-off-by: Peng Zhang --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index b62e3a8a609..6ea6b025d3c 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -8780,6 +8780,7 @@ int RGWRados::cls_bucket_list_unordered(const DoutPrefixProvider *dpp, ent_list.emplace_back(std::move(dirent)); ++count; } else { + last_added_entry = dirent.key; *is_truncated = true; goto check_updates; }