Due to a previous bug bucket indices can have olh entries with
an empty name. During reshard these are all mapped to shard 0,
easily triggering warnings about too many omap entries.
Skip these entries during reshard, thereby cleaning the bucket
of these leftover bogus entries.
Fixes: https://tracker.ceph.com/issues/54500
Related-to: https://tracker.ceph.com/issues/46456
Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
(cherry picked from commit
dd83913606a870c08f9602d3eebac9444d7a0cc9)
rgw_bucket_category_stats stats;
bool account = entry.get_info(&cls_key, &category, &stats);
rgw_obj_key key(cls_key);
+ if (entry.type == BIIndexType::OLH && key.empty()) {
+ // bogus entry created by https://tracker.ceph.com/issues/46456
+ // to fix, skip so it doesn't get include in the new bucket instance
+ total_entries--;
+ ldpp_dout(dpp, 10) << "Dropping entry with empty name, idx=" << marker << dendl;
+ continue;
+ }
rgw_obj obj(new_bucket_info.bucket, key);
RGWMPObj mp;
if (key.ns == RGW_OBJ_NS_MULTIPART && mp.from_meta(key.name)) {