[ https://issues.apache.org/jira/browse/HADOOP-18425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17702687#comment-17702687 ]
ASF GitHub Bot commented on HADOOP-18425: ----------------------------------------- saxenapranav commented on code in PR #5494: URL: https://github.com/apache/hadoop/pull/5494#discussion_r1142106366 ########## hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClient.java: ########## @@ -613,39 +644,58 @@ private void incrementAbfsRenamePath() { * Exceptions raised in the probe of the destination are swallowed, * so that they do not interfere with the original rename failures. * @param source source path + * @param sourceEtag etag of source file. may be null or empty * @param op Rename request REST operation response with non-null HTTP response * @param destination rename destination path - * @param sourceEtag etag of source file. may be null or empty * @param tracingContext Tracks identifiers for request header + * @param isDir is the source a file or directory * @return true if the file was successfully copied */ public boolean renameIdempotencyCheckOp( final String source, final String sourceEtag, final AbfsRestOperation op, final String destination, - TracingContext tracingContext) { + TracingContext tracingContext, + final boolean isDir) { Preconditions.checkArgument(op.hasResult(), "Operations has null HTTP response"); - if ((op.isARetriedRequest()) - && (op.getResult().getStatusCode() == HttpURLConnection.HTTP_NOT_FOUND) - && isNotEmpty(sourceEtag)) { - + if (!(op.isARetriedRequest()) + && (op.getResult().getStatusCode() == HttpURLConnection.HTTP_NOT_FOUND)) { + // not an error + return false; + } + LOG.debug("Source not found on retry of rename({}, {}) isDir {} etag {}", Review Comment: this function gets invoked for any AbfsBlobFileSystemException whether it be because of 404 or any other: https://github.com/steveloughran/hadoop/blob/70a8d0fb3956b2a0e2c343373475ef7a0e75ab08/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClient.java#L607. now because at line 668, it is because : ``` op.isARetriedRequest() || op.getResult().getStatusCode() != HttpUrlConnection.HTTP_NOT_FOUND ``` any retried operation will come on this line. > [ABFS]: RenameFilePath Source File Not Found (404) error in retry loop > ---------------------------------------------------------------------- > > Key: HADOOP-18425 > URL: https://issues.apache.org/jira/browse/HADOOP-18425 > Project: Hadoop Common > Issue Type: Bug > Components: fs/azure > Reporter: Sree Bhattacharyya > Assignee: Sree Bhattacharyya > Priority: Minor > Labels: pull-request-available > > RenameFilePath on its first try receives a Request timed out error with code > 500. On retrying the same operation, a Source file not found (404) error is > received. > Possible mitigation: Check whether etags remain the same before and after the > retry and accordingly send an Operation Successful result, instead of source > file not found. -- 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