]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: rgw_user_sync_all_stats() uses is_truncated() 36758/head
authorCasey Bodley <cbodley@redhat.com>
Fri, 21 Aug 2020 17:24:53 +0000 (13:24 -0400)
committerCasey Bodley <cbodley@redhat.com>
Fri, 21 Aug 2020 17:24:55 +0000 (13:24 -0400)
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 <cbodley@redhat.com>
src/rgw/rgw_user.cc

index edd030ec1732ddff5b8a9df755c442c7077b43a0..9622d8fa1e3054312b219e8432715f5082346df8 100644 (file)
@@ -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) {