]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: limit rgw_gc_max_objs to RGW_SHARDS_PRIME_1 40383/head
authorRafał Wądołowski <rafal@rafal.net.pl>
Wed, 17 Feb 2021 11:47:07 +0000 (12:47 +0100)
committersinguliere <singuliere@autistici.org>
Wed, 24 Mar 2021 20:38:11 +0000 (21:38 +0100)
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 <rwadolowski@cloudferro.com>
(cherry picked from commit 7b163048d93a078e2354665488a27225042d3f1a)

src/rgw/rgw_gc.cc

index 2267daa40cc55a1e9292b63876157f2f4c700338..898806558e9a4b7e5c6ed5fe6c5ac66ee4369b91 100644 (file)
@@ -312,11 +312,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<int>(cct->_conf->rgw_gc_max_objs), rgw_shards_max()));
+    tag_io_size.resize(min(static_cast<int>(cct->_conf->rgw_gc_max_objs), rgw_shards_max()));
   }
 
   ~RGWGCIOManager() {