[ https://issues.apache.org/jira/browse/HADOOP-18012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17705349#comment-17705349 ]
ASF GitHub Bot commented on HADOOP-18012: ----------------------------------------- sreeb-msft commented on code in PR #5488: URL: https://github.com/apache/hadoop/pull/5488#discussion_r1149233538 ########## hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClient.java: ########## @@ -578,26 +613,49 @@ public AbfsClientRenameResult renamePath( // Extract the sourceEtag, using the status Op, and set it // for future rename recovery. AbfsHttpOperation sourceStatusResult = sourceStatusOp.getResult(); - String sourceEtagAfterFailure = extractEtagHeader(sourceStatusResult); - renamePath(source, destination, continuation, tracingContext, - sourceEtagAfterFailure, isMetadataIncompleteState); - } - // if we get out of the condition without a successful rename, then - // it isn't metadata incomplete state issue. - isMetadataIncompleteState = false; - - boolean etagCheckSucceeded = renameIdempotencyCheckOp( - source, - sourceEtag, op, destination, tracingContext); - if (!etagCheckSucceeded) { - // idempotency did not return different result - // throw back the exception - throw e; + sourceEtagAfterFailure = extractEtagHeader(sourceStatusResult); Review Comment: In case it is a directory, it will still try to recover from the rename failure, and as eTag preservation is not in place, the eTag mismatch would simply pass up the actual exception. This is safer than having shouldAttemptRecovery stay set as false (which would also only happen if the directory check code part gets executed), in which case it would completely omit the idempotency check altogether. ########## hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystem.java: ########## @@ -212,6 +215,8 @@ public void initialize(URI uri, Configuration configuration) } } } + isNamespaceEnabled = abfsStore.getIsNamespaceEnabled(tracingContext); Review Comment: The concern here is valid. Reverting back to the previous way of passing HNS enabled or not to rename API in the latest commit. > ABFS: Enable config controlled ETag check for Rename idempotency > ---------------------------------------------------------------- > > Key: HADOOP-18012 > URL: https://issues.apache.org/jira/browse/HADOOP-18012 > Project: Hadoop Common > Issue Type: Sub-task > Components: fs/azure > Affects Versions: 3.3.2 > Reporter: Sneha Vijayarajan > Assignee: Sree Bhattacharyya > Priority: Major > Labels: pull-request-available > > ABFS driver has a handling for rename idempotency which relies on LMT of the > destination file to conclude if the rename was successful or not when source > file is absent and if the rename request had entered retry loop. > This handling is incorrect as LMT of the destination does not change on > rename. > This Jira will track the change to undo the current implementation and add a > new one where for an incoming rename operation, source file eTag is fetched > first and then rename is done only if eTag matches for the source file. > As this is going to be a costly operation given an extra HEAD request is > added to each rename, this implementation will be guarded over a config and > can enabled by customers who have workloads that do multiple renames. > Long term plan to handle rename idempotency without HEAD request is being > discussed. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org