From c4463f7860de91eb269460aa9831f4601a859b6b Mon Sep 17 00:00:00 2001 From: Mark Kogan Date: Thu, 5 Sep 2019 12:32:50 +0300 Subject: [PATCH] rgw: fix memory growth while deleteing objects with radosgw-admin bucket rm --bucket=$BIG_BUCKET --bypass-gc --purge-objects by freeing map elements allocated at https://github.com/ceph/ceph/blob/master/src/rgw/rgw_rados.cc#L236 result = &objs_state[obj]; Fixes: https://tracker.ceph.com/issues/40700 Signed-off-by: Mark Kogan (cherry picked from commit 21560ed2e141137bbcb4d871eb3908d293a83948) Conflicts: src/rgw/rgw_bucket.cc - in mimic, "invalidate" is a method of "obj_ctx.obj" where in master it's a method of the parent class "obj_ctx" --- src/rgw/rgw_bucket.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rgw/rgw_bucket.cc b/src/rgw/rgw_bucket.cc index c975dbca1010..0c95532f87bd 100644 --- a/src/rgw/rgw_bucket.cc +++ b/src/rgw/rgw_bucket.cc @@ -725,6 +725,7 @@ int rgw_remove_bucket_bypass_gc(RGWRados *store, rgw_bucket& bucket, } max_aio = concurrent_max; } + obj_ctx.obj.invalidate(obj); } // for all RGW objects } -- 2.47.3