From: Mark Kogan Date: Mon, 10 Aug 2020 10:19:19 +0000 (+0300) Subject: rgw: fix user stats iterative increment X-Git-Tag: v15.2.8~5^2~1^2~35^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=271eae37ca823c768e42e57bb845c93d9e3ef52f;p=ceph.git rgw: fix user stats iterative increment The RGWBucketCtl::sync_user_stats() function can increment or reset the stats [1][2] [1]https://github.com/ceph/ceph/blob/master/src/rgw/rgw_bucket.cc#L3745 [2]https://github.com/ceph/ceph/blob/master/src/rgw/services/svc_bi_rados.cc#L379-L381 fixes: https://tracker.ceph.com/issues/46400 Signed-off-by: Mark Kogan (cherry picked from commit 21e877ca67db7840026b1768751b167e2c0a53da) Conflicts: src/rgw/rgw_sal.cc - master's owner->get_id() becomes user.info.user_id in octopus --- diff --git a/src/rgw/rgw_sal.cc b/src/rgw/rgw_sal.cc index 22cb33fa216b..2b7a313ed912 100644 --- a/src/rgw/rgw_sal.cc +++ b/src/rgw/rgw_sal.cc @@ -177,7 +177,7 @@ int RGWRadosBucket::read_bucket_stats(optional_yield y) int RGWRadosBucket::sync_user_stats() { - return store->ctl()->bucket->sync_user_stats(user.info.user_id, info, &ent); + return store->ctl()->bucket->sync_user_stats(user.info.user_id, info); } int RGWRadosBucket::update_container_stats(void)