From 9300c9f5e068a3e34686c848675d4895bf02453a Mon Sep 17 00:00:00 2001 From: Peng Zhang Date: Fri, 2 Jul 2021 14:13:50 +0800 Subject: [PATCH] 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 (cherry picked from commit 7511f9f675ea4e43992605dc03109bc5f356a5e1) --- src/rgw/rgw_rados.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index a677613793fb..c469f22b590f 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -8690,6 +8690,7 @@ int RGWRados::cls_bucket_list_unordered(RGWBucketInfo& bucket_info, ent_list.emplace_back(std::move(dirent)); ++count; } else { + last_added_entry = dirent.key; *is_truncated = true; goto check_updates; } -- 2.47.3