[ https://issues.apache.org/jira/browse/HDFS-17733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17928968#comment-17928968 ]
ASF GitHub Bot commented on HDFS-17733: --------------------------------------- KeeProMise commented on code in PR #7415: URL: https://github.com/apache/hadoop/pull/7415#discussion_r1964648840 ########## hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/async/RouterAsyncClientProtocol.java: ########## @@ -1057,33 +1057,33 @@ public boolean setReplication(String src, short replication) * subclusters else false in all other scenarios. * @throws IOException if unable to get the file status. */ + @VisibleForTesting @Override public boolean isMultiDestDirectory(String src) throws IOException { - try { + asyncComplete(false); Review Comment: Hi, @hfutatzhanghb don’t need to add this here. If the code inside the **asyncTry** block executes without any exceptions, a **CompletableFuture** containing **true** or **false** will definitely be set to the thread-local variable. If the **asyncTry** block throws an **UnresolvedPathException**, it can be caught by **asyncCatch** and a **CompletableFuture** containing **false** will be set to the thread-local variable. If the **asyncTry** block throws any **other exception**, a **CompletableFuture** containing that exception will be set to the thread-local variable for the outer method to handle, which is consistent with the original synchronous logic. > [ARR] Optimize isMultiDestDirectory method using AsyncUtil class > ---------------------------------------------------------------- > > Key: HDFS-17733 > URL: https://issues.apache.org/jira/browse/HDFS-17733 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: rbf > Reporter: farmmamba > Assignee: farmmamba > Priority: Major > Labels: pull-request-available > > Optimize isMultiDestDirectory method using AsyncUtil class. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org