From 7b163048d93a078e2354665488a27225042d3f1a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20Wa=CC=A8do=C5=82owski?= Date: Wed, 17 Feb 2021 12:47:07 +0100 Subject: [PATCH] rgw: limit rgw_gc_max_objs to RGW_SHARDS_PRIME_1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Don't allow GC to process more gc ojects than RGW_SHARDS_PRIME_1 Fixes: https://tracker.ceph.com/issues/49321 Signed-off-by: Rafał Wądołowski --- src/rgw/rgw_gc.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rgw/rgw_gc.cc b/src/rgw/rgw_gc.cc index 322871f84ec2..5e3070d3fcc1 100644 --- a/src/rgw/rgw_gc.cc +++ b/src/rgw/rgw_gc.cc @@ -313,11 +313,11 @@ class RGWGCIOManager { public: RGWGCIOManager(const DoutPrefixProvider* _dpp, CephContext *_cct, RGWGC *_gc) : dpp(_dpp), - cct(_cct), - gc(_gc), - remove_tags(cct->_conf->rgw_gc_max_objs), - tag_io_size(cct->_conf->rgw_gc_max_objs) { + cct(_cct), + gc(_gc) { max_aio = cct->_conf->rgw_gc_max_concurrent_io; + remove_tags.resize(min(static_cast(cct->_conf->rgw_gc_max_objs), rgw_shards_max())); + tag_io_size.resize(min(static_cast(cct->_conf->rgw_gc_max_objs), rgw_shards_max())); } ~RGWGCIOManager() { -- 2.47.3