Description: fix rgw unable to abort multipart upload after the bucket got resharded Author: Dongdong Tao, dongdong.tao@canonical.com Origin: upstream, https://github.com/ceph/ceph/pull/32617 Bug: https://tracker.ceph.com/issues/43583 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ Index: ceph-12.2.13/src/rgw/rgw_reshard.cc =================================================================== --- ceph-12.2.13.orig/src/rgw/rgw_reshard.cc +++ ceph-12.2.13/src/rgw/rgw_reshard.cc @@ -559,6 +559,11 @@ int RGWBucketReshard::do_reshard(int num bool account = entry.get_info(&cls_key, &category, &stats); rgw_obj_key key(cls_key); rgw_obj obj(new_bucket_info.bucket, key); + RGWMPObj mp; + if (key.ns == RGW_OBJ_NS_MULTIPART && mp.from_meta(key.name)) { + // place the multipart .meta object on the same shard as its head object + obj.index_hash_source = mp.get_key(); + } int ret = store->get_target_shard_id(new_bucket_info, obj.get_hash_object(), &target_shard_id); if (ret < 0) { lderr(store->ctx()) << "ERROR: get_target_shard_id() returned ret=" << ret << dendl;