saxenapranav commented on code in PR #6025:
URL: https://github.com/apache/hadoop/pull/6025#discussion_r1318832021


##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/NativeAzureFileSystem.java:
##########
@@ -1242,7 +1242,10 @@ public void setEncodedKey(String anEncodedKey) {
      * when the stream is closed.
      */
     private void restoreKey() throws IOException {
-      store.rename(getEncodedKey(), getKey());
+      String key = getKey();
+      FileMetadata existingMetadata = store.retrieveMetadata(key);

Review Comment:
   As I understand from the code, there shouldn't be any write on the original 
file and on the close of outputstream on the tmpFile, it rename it to original 
file.
   Is there any flow which would be writing on the original file before the 
rename.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to