ben-roling 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_r269607944
##########
File path:
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/ChangeTracker.java
##########
@@ -148,16 +177,77 @@ public void processResponse(final S3Object object,
}
}
- final ObjectMetadata metadata = object.getObjectMetadata();
+ processMetadata(object.getObjectMetadata(), operation, pos);
+ }
+
+ /**
+ * Process the response from the server for validation against the
+ * change policy.
+ * @param copyResult result of a copy operation
+ * @throws PathIOException raised on failure
+ * @throws RemoteFileChangedException if the remote file has changed.
+ */
+ public void processResponse(final CopyResult copyResult)
Review comment:
Maybe I shouldn't have even put this method in here given it doesn't do
anything (at least right now). I added it before I realized the ETag and
versionId wouldn't (necessarily) be the same on the copied object. With
certain encryption algorithms, ETag will actually be the same and I suppose we
could try to compare in those cases but it felt too awkward to bother with.
I'm curious for feedback. Should I remove this method altogether? Or leave
it as a means to document that it wasn't just forgotten?
----------------------------------------------------------------
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]