]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: remove unused opstate params from copy/fetch/stat
authorCasey Bodley <cbodley@redhat.com>
Wed, 12 Sep 2018 13:03:29 +0000 (09:03 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 19 Sep 2018 14:32:36 +0000 (10:32 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_cr_rados.cc
src/rgw/rgw_op.cc
src/rgw/rgw_op.h
src/rgw/rgw_rados.cc
src/rgw/rgw_rados.h
src/rgw/rgw_rest_s3.cc

index 7179b572505ff338f385a537d9b7cf8cd7a50053..f39d760e8d4dbd2b32c03fee35103d816c568f5f 100644 (file)
@@ -550,8 +550,6 @@ int RGWAsyncFetchRemoteObj::_send_request()
   string user_id;
   char buf[16];
   snprintf(buf, sizeof(buf), ".%lld", (long long)store->instance_id());
-  string client_id = store->zone_id() + buf;
-  string op_id = store->unique_id(store->get_new_req_id());
   map<string, bufferlist> attrs;
 
   rgw_obj src_obj(bucket_info.bucket, key);
@@ -560,9 +558,6 @@ int RGWAsyncFetchRemoteObj::_send_request()
 
   int r = store->fetch_remote_obj(obj_ctx,
                        user_id,
-                       client_id,
-                       op_id,
-                       false, /* don't record op state in ops log */
                        NULL, /* req_info */
                        source_zone,
                        dest_obj,
@@ -602,8 +597,6 @@ int RGWAsyncStatRemoteObj::_send_request()
   string user_id;
   char buf[16];
   snprintf(buf, sizeof(buf), ".%lld", (long long)store->instance_id());
-  string client_id = store->zone_id() + buf;
-  string op_id = store->unique_id(store->get_new_req_id());
 
   rgw_obj src_obj(bucket_info.bucket, key);
 
@@ -611,7 +604,6 @@ int RGWAsyncStatRemoteObj::_send_request()
 
   int r = store->stat_remote_obj(obj_ctx,
                        user_id,
-                       client_id,
                        nullptr, /* req_info */
                        source_zone,
                        src_obj,
index 3267060276b13e9b5c21edbbff23e36d59625718..5d8ecafe32314d371f1140ab99c35da6fce32b51 100644 (file)
@@ -4842,8 +4842,6 @@ void RGWCopyObj::execute()
 
   op_ret = store->copy_obj(obj_ctx,
                           s->user->user_id,
-                          client_id,
-                          op_id,
                           &s->info,
                           source_zone,
                           dst_obj,
index ea590fa97d48001e05a41abadd5de8163d5e1b6b..5cd73b2c3d4052c9eb46c7c84acc3f7058282dcb 100644 (file)
@@ -1314,8 +1314,6 @@ protected:
   RGWBucketInfo src_bucket_info;
   RGWBucketInfo dest_bucket_info;
   string source_zone;
-  string client_id;
-  string op_id;
   string etag;
 
   off_t last_ofs;
index d7fe958eb8b9860afcf6b8c2d944aa5466789f6a..3d6a857a4eaedd9ea63c6989dbd7ec1aec023251 100644 (file)
@@ -6928,9 +6928,6 @@ int RGWRados::swift_versioning_copy(RGWObjectCtx& obj_ctx,
     return 0;
   }
 
-  string client_id;
-  string op_id;
-
   const string& src_name = obj.get_oid();
   char buf[src_name.size() + 32];
   struct timespec ts = ceph::real_clock::to_timespec(state->mtime);
@@ -6959,8 +6956,6 @@ int RGWRados::swift_versioning_copy(RGWObjectCtx& obj_ctx,
 
   r = copy_obj(obj_ctx,
                user,
-               client_id,
-               op_id,
                NULL, /* req_info *info */
                no_zone,
                dest_obj,
@@ -7025,8 +7020,6 @@ int RGWRados::swift_versioning_restore(RGWObjectCtx& obj_ctx,
 
   /* This code will be executed on latest version of the object. */
   const auto handler = [&](const rgw_bucket_dir_entry& entry) -> int {
-    std::string no_client_id;
-    std::string no_op_id;
     std::string no_zone;
 
     /* We don't support object versioning of Swift API on those buckets that
@@ -7048,8 +7041,6 @@ int RGWRados::swift_versioning_restore(RGWObjectCtx& obj_ctx,
 
     int ret = copy_obj(obj_ctx,
                        user,
-                       no_client_id,
-                       no_op_id,
                        nullptr,       /* req_info *info */
                        no_zone,
                        obj,           /* dest obj */
@@ -7861,7 +7852,6 @@ public:
 
 int RGWRados::stat_remote_obj(RGWObjectCtx& obj_ctx,
                const rgw_user& user_id,
-               const string& client_id,
                req_info *info,
                const string& source_zone,
                rgw_obj& src_obj,
@@ -7974,9 +7964,6 @@ int RGWRados::stat_remote_obj(RGWObjectCtx& obj_ctx,
 
 int RGWRados::fetch_remote_obj(RGWObjectCtx& obj_ctx,
                const rgw_user& user_id,
-               const string& client_id,
-               const string& op_id,
-               bool record_op_state,
                req_info *info,
                const string& source_zone,
                rgw_obj& dest_obj,
@@ -8261,8 +8248,6 @@ int RGWRados::copy_obj_to_remote_dest(RGWObjState *astate,
  */
 int RGWRados::copy_obj(RGWObjectCtx& obj_ctx,
                const rgw_user& user_id,
-               const string& client_id,
-               const string& op_id,
                req_info *info,
                const string& source_zone,
                rgw_obj& dest_obj,
@@ -8310,7 +8295,7 @@ int RGWRados::copy_obj(RGWObjectCtx& obj_ctx,
   ldout(cct, 5) << "Copy object " << src_obj.bucket << ":" << src_obj.get_oid() << " => " << dest_obj.bucket << ":" << dest_obj.get_oid() << dendl;
 
   if (remote_src || !source_zone.empty()) {
-    return fetch_remote_obj(obj_ctx, user_id, client_id, op_id, true, info, source_zone,
+    return fetch_remote_obj(obj_ctx, user_id, info, source_zone,
                dest_obj, src_obj, dest_bucket_info, src_bucket_info, src_mtime, mtime, mod_ptr,
                unmod_ptr, high_precision_time,
                if_match, if_nomatch, attrs_mod, copy_if_newer, attrs, category,
index 463a35446b535b821b4649d9f9348a80e7b0680c..2fd0af6033b8ec8e5f66bca80b8dcf5ce5762599 100644 (file)
@@ -3153,7 +3153,6 @@ public:
 
   int stat_remote_obj(RGWObjectCtx& obj_ctx,
                const rgw_user& user_id,
-               const string& client_id,
                req_info *info,
                const string& source_zone,
                rgw_obj& src_obj,
@@ -3173,9 +3172,6 @@ public:
 
   int fetch_remote_obj(RGWObjectCtx& obj_ctx,
                        const rgw_user& user_id,
-                       const string& client_id,
-                       const string& op_id,
-                       bool record_op_state,
                        req_info *info,
                        const string& source_zone,
                        rgw_obj& dest_obj,
@@ -3217,8 +3213,6 @@ public:
    */
   int copy_obj(RGWObjectCtx& obj_ctx,
                const rgw_user& user_id,
-               const string& client_id,
-               const string& op_id,
                req_info *info,
                const string& source_zone,
                rgw_obj& dest_obj,
index deca9cea9613bb6eba14ef79731cd8698ec68c7c..0e25e10e2f9d604106451556ec649a86256730d1 100644 (file)
@@ -2125,19 +2125,6 @@ int RGWCopyObj_ObjStore_S3::get_params()
   if (s->system_request) {
     source_zone = s->info.args.get(RGW_SYS_PARAM_PREFIX "source-zone");
     s->info.args.get_bool(RGW_SYS_PARAM_PREFIX "copy-if-newer", &copy_if_newer, false);
-    if (!source_zone.empty()) {
-      client_id = s->info.args.get(RGW_SYS_PARAM_PREFIX "client-id");
-      op_id = s->info.args.get(RGW_SYS_PARAM_PREFIX "op-id");
-
-      if (client_id.empty() || op_id.empty()) {
-       ldout(s->cct, 0) <<
-         RGW_SYS_PARAM_PREFIX "client-id or "
-         RGW_SYS_PARAM_PREFIX "op-id were not provided, "
-         "required for intra-region copy"
-                        << dendl;
-       return -EINVAL;
-      }
-    }
   }
 
   copy_source = s->info.env->get("HTTP_X_AMZ_COPY_SOURCE");