]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw/rados: RadosReadOp::prepare only updates object instance
authorCasey Bodley <cbodley@redhat.com>
Mon, 20 Feb 2023 22:27:28 +0000 (17:27 -0500)
committerCasey Bodley <cbodley@redhat.com>
Tue, 21 Nov 2023 16:09:23 +0000 (11:09 -0500)
when called on a versioned object, prepare() may follow olh and look up
a different object instance

but when called on a multipart part, we should not overwrite the
original object name with the part's object name (of the form
mymultipart.2~_XLFNqOW0NuiALg7q4-Hi_7hdtAkZUH.1)

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/driver/rados/rgw_sal_rados.cc

index e619e968114812bead7cc6c1070a8f597d89987f..f536b7609e85f4ffb631bef6bfd24ec46c52c4b3 100644 (file)
@@ -1955,7 +1955,7 @@ int RadosObject::RadosReadOp::prepare(optional_yield y, const DoutPrefixProvider
   if (ret < 0)
     return ret;
 
-  source->set_key(parent_op.state.obj.key);
+  source->set_instance(parent_op.state.obj.key.instance);
   source->set_obj_size(obj_size);
 
   return ret;