From: Casey Bodley Date: Fri, 21 Aug 2020 17:24:53 +0000 (-0400) Subject: rgw: rgw_user_sync_all_stats() uses is_truncated() X-Git-Tag: v16.1.0~1202^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=defefcc20ac114bda41bddb371b2b1a67ee2e158;p=ceph.git 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 --- 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) {