From: Casey Bodley Date: Tue, 31 May 2022 21:29:37 +0000 (-0400) Subject: rgw: restore check for empty olh name on reshard X-Git-Tag: v18.0.0~787^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bed70513834fdf03dc1eda2ec00ff7b66307af41;p=ceph.git rgw: restore check for empty olh name on reshard Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_reshard.cc b/src/rgw/rgw_reshard.cc index 2d4142ac40ad..4af9ac8b8bcd 100644 --- a/src/rgw/rgw_reshard.cc +++ b/src/rgw/rgw_reshard.cc @@ -858,6 +858,13 @@ int RGWBucketReshard::do_reshard(const rgw::bucket_index_layout_generation& curr 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(bucket_info.bucket, key); RGWMPObj mp; if (key.ns == RGW_OBJ_NS_MULTIPART && mp.from_meta(key.name)) {