Skip to content

Commit df04e25

Browse files
authored
Merge pull request ceph#63443 from ivancich/wip-dbr-versioned
rgw: make sure max_objs_per_shard is appropriate in debugging scenarios Reviewed-by: Casey Bodley <[email protected]>
2 parents 476f6d0 + 27f9c10 commit df04e25

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/rgw/driver/rados/rgw_rados.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11151,6 +11151,10 @@ void RGWRados::calculate_preferred_shards(const DoutPrefixProvider* dpp,
1115111151
max_objs_per_shard /= 3;
1115211152
}
1115311153

11154+
// make sure it's at least 1, as in some testing scenarios it's artificially low
11155+
constexpr uint64_t min_max_objs_per_shard = 1;
11156+
max_objs_per_shard = std::max(min_max_objs_per_shard, max_objs_per_shard);
11157+
1115411158
const bool is_multisite = svc.zone->need_to_log_data();
1115511159

1115611160
RGWBucketReshard::calculate_preferred_shards(dpp,

0 commit comments

Comments
 (0)