]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: fix bad memory usage of bucket chown method 45490/head
authorMohammad Fatemipour <mohammad.fatemipour@sotoon.ir>
Sun, 19 Dec 2021 18:33:55 +0000 (22:03 +0330)
committerCory Snyder <csnyder@iland.com>
Thu, 17 Mar 2022 13:25:41 +0000 (09:25 -0400)
commit7e7f129ce964dbe7147fbd640dd7739028c6c67b
tree2a9dd38e48702fda746ea10068e95859047358e1
parentbf57e1631607dfb8446e9a2061a855c6cab4c09b
rgw: fix bad memory usage of bucket chown method

In RGWBucketCtl::chown we have one RGWObjectCtx for all objects of a bucket.
In RGWObjectCtx there is a cache mechanism (std::map) for states of objects that will grows
continuously. for buckets with millions of objects this mechanism leads to huge memory usage.

in chown process we really do not need this caching mechanism so we could create one RGWObjectCtx
for every 1000 objects to limit usage of memory.

Fixes: https://tracker.ceph.com/issues/53599
Signed-off-by: Mohammad Fatemipour <mohammad.fatemipour@sotoon.ir>
(cherry picked from commit cf2d83ef81458524715c23e802977dc0760c847f)
src/rgw/rgw_bucket.cc