From: Cory Snyder Date: Mon, 25 Jul 2022 19:47:16 +0000 (-0400) Subject: rgw: maintain object instance within RGWRadosObject::get_obj_state method X-Git-Tag: v16.2.11~392^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a2e3cd7171fd533bbd3b2f1846394f3cfaa1ac29;p=ceph.git rgw: maintain object instance within RGWRadosObject::get_obj_state method 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 --- diff --git a/src/rgw/rgw_sal_rados.cc b/src/rgw/rgw_sal_rados.cc index 6ba315f138b1..9a6c473b93ab 100644 --- a/src/rgw/rgw_sal_rados.cc +++ b/src/rgw/rgw_sal_rados.cc @@ -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)