]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix for null version_id in fetch_remote_obj() 14606/head
authorCasey Bodley <cbodley@redhat.com>
Wed, 5 Apr 2017 20:19:57 +0000 (16:19 -0400)
committerAlexey Sheplyakov <asheplyakov@mirantis.com>
Tue, 18 Apr 2017 11:38:47 +0000 (15:38 +0400)
commit 8b43c9781206c22d9aedb4beb8d669bf1e23169f fixed the wrong use of
the dest_obj's version, but removed the check for "null" version

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 915370776df5b964c2ee8d9f9329562919eef8d5)

src/rgw/rgw_rados.cc

index 9e329fc73a5d02e4997f004c921a07006012f9dd..3501a4a4f69eb51620c60b6b2a468506587d37ea 100644 (file)
@@ -7061,7 +7061,7 @@ int RGWRados::fetch_remote_obj(RGWObjectCtx& obj_ctx,
   RGWPutObjProcessor_Atomic processor(obj_ctx,
                                       dest_bucket_info, dest_obj.bucket, dest_obj.get_orig_obj(),
                                       cct->_conf->rgw_obj_stripe_size, tag, dest_bucket_info.versioning_enabled());
-  if (version_id) {
+  if (version_id && *version_id != "null") {
     processor.set_version_id(*version_id);
   }
   processor.set_olh_epoch(olh_epoch);