]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix double counting in RGWRados::update_containers_stats() 9584/head
authorAlbert Tu <albert.t@inwinstack.com>
Tue, 28 Jun 2016 02:38:07 +0000 (10:38 +0800)
committerAlbert Tu <albert.t@inwinstack.com>
Fri, 1 Jul 2016 02:22:01 +0000 (10:22 +0800)
Fixes: http://tracker.ceph.com/issues/16188
Signed-off-by: Albert Tu <albert.t@inwinstack.com>
src/rgw/rgw_rados.cc

index 078fe9cd84c80155f0d29c4d59bdd562bf686649..ba4c2db202079e93b2a0a802c2c730dc33872a54 100644 (file)
@@ -10841,6 +10841,9 @@ int RGWRados::update_containers_stats(map<string, RGWBucketEnt>& m)
   for (iter = m.begin(); iter != m.end(); ++iter) {
     RGWBucketEnt& ent = iter->second;
     rgw_bucket& bucket = ent.bucket;
+    ent.count = 0;
+    ent.size = 0;
+    ent.size_rounded = 0;
 
     map<string, rgw_bucket_dir_header> headers;
     int r = cls_bucket_head(bucket, RGW_NO_SHARD, headers);