hfutatzhanghb commented on PR #7539:
URL: https://github.com/apache/hadoop/pull/7539#issuecomment-2754246539
> > addClientInfoToCallerContext
>
> hi @hfutatzhanghb thanks, got it! We can fix this issue in the transfer
method of ThreadLocalContext:
>
> ```java
> public void transfer() {
> if (call != null) {
> Server.getCurCall().set(call);
> }
> CallerContext.setCurrent(null);
> if (context != null) {
> CallerContext.setCurrent(context);
> }
> if (startOpTime != -1L) {
> FederationRPCPerformanceMonitor.setStartOpTime(startOpTime);
> }
> if (proxyOpTime != -1L) {
> FederationRPCPerformanceMonitor.setProxyOpTime(proxyOpTime);
> }
> }
> ```
@KeeProMise Thanks for this nice suggestion, move
`CallerContext.setCurrent(null);` to transfer() seems better, because the goal
of this method is to manipulate ThreadLocal object. Will modify it. Thanks
again.
--
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]