From: Daniel Gryniewicz Date: Tue, 15 Apr 2025 14:37:42 +0000 (-0400) Subject: RGW - zipper - Set the instance in get_obj_attrs() X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b8079bd48b2fae0ef39383fe2bfbf532acaafa84;p=ceph.git RGW - zipper - Set the instance in get_obj_attrs() get_obj_attrs() gets the instance of the object, but isn't setting it into the Object. Do this, so that calling get_obj_attrs() ensures the instance is correct. Signed-off-by: Daniel Gryniewicz --- diff --git a/src/rgw/driver/rados/rgw_sal_rados.cc b/src/rgw/driver/rados/rgw_sal_rados.cc index 8618868b3b13..aa889ca7caa0 100644 --- a/src/rgw/driver/rados/rgw_sal_rados.cc +++ b/src/rgw/driver/rados/rgw_sal_rados.cc @@ -2731,8 +2731,16 @@ int RadosObject::get_obj_attrs(optional_yield y, const DoutPrefixProvider* dpp) { RGWRados::Object op_target(store->getRados(), bucket->get_info(), *rados_ctx, get_obj()); RGWRados::Object::Read read_op(&op_target); + rgw_obj target = get_obj(); + + int r = read_attrs(dpp, read_op, y, &target); + if (r < 0) { + return r; + } - return read_attrs(dpp, read_op, y); + set_instance(target.key.instance); + + return 0; } int RadosObject::modify_obj_attrs(const char* attr_name, bufferlist& attr_val, optional_yield y, const DoutPrefixProvider* dpp, uint32_t flags)