]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: clear 'null' object instance when fetching remote obj
authorYehuda Sadeh <yehuda@redhat.com>
Tue, 22 Dec 2015 00:17:56 +0000 (16:17 -0800)
committerYehuda Sadeh <yehuda@redhat.com>
Fri, 12 Feb 2016 00:13:47 +0000 (16:13 -0800)
otherwise the objclass code will handle it as a versioned object

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_rados.cc

index b8d299394be6a74c11b3fe72bba2e3dd43fff383..94fe5653effe087b30197b6cb3eb75c0b31015b8 100644 (file)
@@ -6108,7 +6108,10 @@ 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());
-  processor.set_version_id(dest_obj.get_instance());
+  const string& instance = dest_obj.get_instance();
+  if (instance != "null") {
+    processor.set_version_id(dest_obj.get_instance());
+  }
   processor.set_olh_epoch(olh_epoch);
   int ret = processor.prepare(this, NULL);
   if (ret < 0) {