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)
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() {