anmolanmol1234 commented on code in PR #7559: URL: https://github.com/apache/hadoop/pull/7559#discussion_r2037136377
########## hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/BlobRenameHandler.java: ########## @@ -192,6 +196,13 @@ private boolean finalSrcRename() throws AzureBlobFileSystemException { tracingContext.setOperatedBlobCount(operatedBlobCount.get() + 1); try { return renameInternal(src, dst); + } catch(AbfsRestOperationException e) { + if (e.getStatusCode() == HttpURLConnection.HTTP_CONFLICT) { + // If the destination path already exists, then delete the source path. + getAbfsClient().deleteBlobPath(src, null, tracingContext); Review Comment: Should we validate that destination has the same Etag as the source before assuming that if it already exists, it is safe to delete the source ? -- 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: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org