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

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

hfutatzhanghb commented on code in PR #7686:
URL: https://github.com/apache/hadoop/pull/7686#discussion_r2106394894


##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/ThreadLocalContext.java:
##########
@@ -75,6 +75,7 @@ public ThreadLocalContext() {
    * that the task execution reflects the state of the original calling thread.
    */
   public void transfer() {
+    Server.getCurCall().set(null);

Review Comment:
   @slfan1989 Thanks a lot for your reviewing, we should reset 
`Server.getCurCall` here to avoid async responder thread use wrong ThreadLocal 
variable.  For example, router always receives `safemode_get` response from 
NameNode, if we don't reset `Server.getCurCall()`, we will find the call 
information occurs in the debug log which is not accurate. 





> [ARR] Optimize the debug log of method asyncIpcClient to print concrete call 
> info
> ---------------------------------------------------------------------------------
>
>                 Key: HDFS-17783
>                 URL: https://issues.apache.org/jira/browse/HDFS-17783
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: rbf
>            Reporter: farmmamba
>            Assignee: farmmamba
>            Priority: Minor
>              Labels: pull-request-available
>         Attachments: image-2025-05-14-10-11-43-575.png
>
>
> Currently, the debug log in method asyncIpcClient can not print the RpcCall 
> information such as callId. clientIp, clientPort, callercontext. etc.
> It print lambda expression object now which is not what we expected.
>  
> !image-2025-05-14-10-11-43-575.png!



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

Reply via email to