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