]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
RGW:Multisite: Check rgw_sync_obj_etag_verify option only once
authorPrasad Krishnan <prasad.krishnan@flipkart.com>
Tue, 24 Mar 2020 18:19:59 +0000 (18:19 +0000)
committerPrasad Krishnan <prasad.krishnan@flipkart.com>
Tue, 24 Mar 2020 18:19:59 +0000 (18:19 +0000)
Signed-off-by: Prasad Krishnan <prasad.krishnan@flipkart.com>
src/rgw/rgw_rados.cc

index acd452ada20ad2533d5bfd9ad4a24f5d3eb5a849..0de5bc15fa48126e042857c786c8c9d81240ed07 100644 (file)
@@ -3456,6 +3456,10 @@ public:
       return "";
     }
   }
+
+  SourceObjType get_obj_type() {
+    return obj_type;
+  }
 };
 
 /*
@@ -4009,7 +4013,8 @@ int RGWRados::fetch_remote_obj(RGWObjectCtx& obj_ctx,
     set_mtime_weight.init(set_mtime, svc.zone->get_zone_short_id(), pg_ver);
   }
 
-  if (cct->_conf->rgw_sync_obj_etag_verify) {
+  /* Perform ETag verification is we have computed the object's MD5 sum at our end */
+  if (cb.get_obj_type() != OBJ_TYPE_UNINIT) {
     string trimmed_etag = etag;
 
     /* Remove the leading and trailing double quotes from etag */