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 <dang@fprintf.net>
{
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)