[ 
https://issues.apache.org/jira/browse/HDFS-17922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18082216#comment-18082216
 ] 

ASF GitHub Bot commented on HDFS-17922:
---------------------------------------

hfutatzhanghb commented on PR #8500:
URL: https://github.com/apache/hadoop/pull/8500#issuecomment-4494926907

   > Hello, @hfutatzhanghb Thanks for reviewing the pr.
   > 
   > > When i drop asyncComplete(null);, the unit test you submit can also pass.
   > 
   > Interesting. Can you elaborate more about your setup and how you run the 
test? I'm testing it on an Intel Xeon Silver 4310 with Ubuntu 22.04. It passed 
with the asyncComplete, and gave this assertion error without the asyncComplete.
   > 
   > <img alt="image" width="1584" height="614" 
src="https://private-user-images.githubusercontent.com/64581930/594763409-813a1175-b609-4667-9bfa-342b92db02ed.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzkyNTYzMzUsIm5iZiI6MTc3OTI1NjAzNSwicGF0aCI6Ii82NDU4MTkzMC81OTQ3NjM0MDktODEzYTExNzUtYjYwOS00NjY3LTliZmEtMzQyYjkyZGIwMmVkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA1MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNTIwVDA1NDcxNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRkYzI5ZmQ5NDEzNTM4MmM2MjdmMjk5YTc5Yjc0MmRhMDUwYzNlODFmMmJkNWIyNzU2OGI1NmIxMmI2YmZkYmQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.vxVt1RyFwFaXa2UkTqd4jBPsPKU2L8LtSQ_0SJo2FQw";>
   
   LGTM. +1
   I compile and run the unit test again, it behavied as expected.
   
   <img width="2237" height="542" alt="image" 
src="https://github.com/user-attachments/assets/42c28987-1d5b-46b4-8ac3-9cb8250f667b";
 />
   




> rename2 in the router asynchronous RPC is missing an async path
> ---------------------------------------------------------------
>
>                 Key: HDFS-17922
>                 URL: https://issues.apache.org/jira/browse/HDFS-17922
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Dimas Shidqi Parikesit
>            Priority: Major
>              Labels: pull-request-available
>
> In RouterAsyncClientProtocol:rename2, there is a path that returns 
> synchronously if we have empty locations `if (locs.isEmpty)`.
> {code:java}
> @Override
>   public void rename2(
>       final String src, final String dst,
>       final Options.Rename... options) throws IOException {
>     ...
>     if (locs.isEmpty()) {
>       rbfRename.routerFedRename(src, dst, srcLocations, dstLocations);
>       // Missing async handling
>       return;
>     }
>     ...
>     asyncApply((AsyncApplyFunction<Boolean, Boolean>) isMultiDestDirectory -> 
> {
>       if (isMultiDestDirectory) {
>         ...
>         rpcClient.invokeConcurrent(locs, method);
>       } else {
>         rpcClient.invokeSequential(locs, method, null, null);
>       }
>     });
>   }{code}
>  
> There are other paths that behave similarly, such as msync()
> {code:java}
> @Override
>   public void msync() throws IOException {
>     rpcServer.checkOperation(NameNode.OperationCategory.READ, true);
>     ...
>     if (namespacesEligibleForObserverReads.isEmpty()) {
>       asyncCompleteWith(CompletableFuture.completedFuture(null));
>       return;
>     }
>     rpcClient.invokeConcurrent(namespacesEligibleForObserverReads, method);
>   } {code}
>  
> We propose to add a patch to add `asyncComplete(null);` before the return.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to