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

   > Hi @hfutatzhanghb In the invokeMethod method of RouterAsyncRpcClient, the 
client's threadLocalContext is reset to the async handler that processes the 
request. Why is there still this issue?
   
   Hi, @KeeProMise . Thanks for reviewing. Please refer to method 
RouterRpcClient#addClientInfoToCallerContext.
   Suppose we never reset CallerContext when using ARR,  the origContext in 
method addClientInfoToCallerContext would never be null and will conduct the 
below logic:
   
   ```java
       if (origContext != null) {
         for (String part : origContext.split(contextFieldSeparator)) {
           String[] keyValue =
               part.split(CallerContext.Builder.KEY_VALUE_SEPARATOR, 2);
           if (keyValue.length == 2) {
             builder.appendIfAbsent(keyValue[0], keyValue[1]);
           } else if (keyValue.length == 1) {
             builder.append(keyValue[0]);
           }
         }
       }
   ```


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

Reply via email to