]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: maintain object instance within RGWRadosObject::get_obj_state method
authorCory Snyder <csnyder@iland.com>
Mon, 25 Jul 2022 19:47:16 +0000 (15:47 -0400)
committerCasey Bodley <cbodley@redhat.com>
Thu, 4 Aug 2022 14:38:37 +0000 (10:38 -0400)
It seems that the object instance was being stripped from the rgw_obj
inadvertently wihtin the RGWRadosObject::get_obj_state method. This
change fixes some S3 behavior related to concurrency and ECANCELED errors.

This is a partial cherry-pick from:
https://github.com/ceph/ceph/commit/72d1a363263cf707d022ee756122236ba175cda2

Fixes: https://tracker.ceph.com/issues/56646
Signed-off-by: Cory Snyder <csnyder@iland.com>
src/rgw/rgw_sal_rados.cc

index 6ba315f138b1804bd7f1b5fdf3f7ef8a4193ad2d..9a6c473b93ab894ad58132dc8d4f0c96ee5287f6 100644 (file)
@@ -426,11 +426,10 @@ int RGWObject::range_to_ofs(uint64_t obj_size, int64_t &ofs, int64_t &end)
 
 int RGWRadosObject::get_obj_state(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx, RGWBucket& bucket, RGWObjState **state, optional_yield y, bool follow_olh)
 {
-  rgw_obj obj(bucket.get_key(), key);
-  obj.set_in_extra_data(in_extra_data);
-  obj.index_hash_source = index_hash_source;
-
-  return store->getRados()->get_obj_state(dpp, rctx, bucket.get_info(), obj, state, follow_olh, y);
+  //rgw_obj obj(bucket.get_key(), key);
+  //obj.set_in_extra_data(in_extra_data);
+  //obj.index_hash_source = index_hash_source;
+  return store->getRados()->get_obj_state(dpp, rctx, bucket.get_info(), get_obj(), state, follow_olh, y);
 }
 
 int RGWRadosObject::read_attrs(RGWRados::Object::Read &read_op, optional_yield y, const DoutPrefixProvider *dpp, rgw_obj *target_obj)