noslowerdna commented on a change in pull request #646: HADOOP-16085: use 
object version or etags to protect against inconsistent read after 
replace/overwrite
URL: https://github.com/apache/hadoop/pull/646#discussion_r269735660
 
 

 ##########
 File path: 
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/ChangeDetectionPolicy.java
 ##########
 @@ -277,11 +295,32 @@ public String getRevisionId(ObjectMetadata 
objectMetadata, String uri) {
       return objectMetadata.getETag();
     }
 
+    @Override
+    public String getRevisionId(S3ObjectAttributes s3Attributes) {
+      return s3Attributes.getETag();
+    }
+
+    @Override
+    public String getRevisionId(CopyResult copyResult) {
+      return copyResult.getETag();
+    }
+
     @Override
     public void applyRevisionConstraint(GetObjectRequest request,
         String revisionId) {
-      LOG.debug("Restricting request to etag {}", revisionId);
-      request.withMatchingETagConstraint(revisionId);
+      if (revisionId != null) {
+        LOG.debug("Restricting request to etag {}", revisionId);
 
 Review comment:
   could clarify "get request" / "copy request" in these log messages so that 
they are unique (same applies for VersionIdChangeDetectionPolicy)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to