Skip to content

Commit b8079bd

Browse files
committed
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 <[email protected]>
1 parent f30a6a8 commit b8079bd

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/rgw/driver/rados/rgw_sal_rados.cc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2731,8 +2731,16 @@ int RadosObject::get_obj_attrs(optional_yield y, const DoutPrefixProvider* dpp)
27312731
{
27322732
RGWRados::Object op_target(store->getRados(), bucket->get_info(), *rados_ctx, get_obj());
27332733
RGWRados::Object::Read read_op(&op_target);
2734+
rgw_obj target = get_obj();
2735+
2736+
int r = read_attrs(dpp, read_op, y, &target);
2737+
if (r < 0) {
2738+
return r;
2739+
}
27342740

2735-
return read_attrs(dpp, read_op, y);
2741+
set_instance(target.key.instance);
2742+
2743+
return 0;
27362744
}
27372745

27382746
int RadosObject::modify_obj_attrs(const char* attr_name, bufferlist& attr_val, optional_yield y, const DoutPrefixProvider* dpp, uint32_t flags)

0 commit comments

Comments
 (0)