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)
Conflicts:
src/rgw/rgw_bucket.cc
Cherry-pick notes:
- Conflicts due to Pacific impementation differences in RGWBucketCtl::chown