]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: restore check for empty olh name on reshard 46464/head
authorCasey Bodley <cbodley@redhat.com>
Tue, 31 May 2022 21:29:37 +0000 (17:29 -0400)
committerCasey Bodley <cbodley@redhat.com>
Tue, 31 May 2022 21:29:59 +0000 (17:29 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_reshard.cc

index 2d4142ac40ad3500f664cb4739aa2be3e220f015..4af9ac8b8bcdc22e9caef2841aedd5413dd47018 100644 (file)
@@ -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)) {