From defefcc20ac114bda41bddb371b2b1a67ee2e158 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Fri, 21 Aug 2020 13:24:53 -0400 Subject: [PATCH] rgw: rgw_user_sync_all_stats() uses is_truncated() rgw_user_sync_all_stats() was using a 'bool is_truncated = false;' flag which never gets set, so it never looped past 1000 entries RGWUser::list_buckets() exposes this truncated flag via RGWBucketList.is_truncated(), so use that instead Signed-off-by: Casey Bodley --- src/rgw/rgw_user.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/rgw/rgw_user.cc b/src/rgw/rgw_user.cc index edd030ec173..9622d8fa1e3 100644 --- a/src/rgw/rgw_user.cc +++ b/src/rgw/rgw_user.cc @@ -54,7 +54,6 @@ int rgw_user_sync_all_stats(rgw::sal::RGWRadosStore *store, const rgw_user& user CephContext *cct = store->ctx(); size_t max_entries = cct->_conf->rgw_list_buckets_max_chunk; - bool is_truncated = false; string marker; int ret; @@ -85,7 +84,7 @@ int rgw_user_sync_all_stats(rgw::sal::RGWRadosStore *store, const rgw_user& user ldout(cct, 0) << "ERROR in check_bucket_shards: " << cpp_strerror(-ret)<< dendl; } } - } while (is_truncated); + } while (user_buckets.is_truncated()); ret = store->ctl()->user->complete_flush_stats(user.get_user()); if (ret < 0) { -- 2.47.3