lgh-cn commented on code in PR #5552:
URL: https://github.com/apache/hadoop/pull/5552#discussion_r1166234652


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java:
##########
@@ -461,6 +462,14 @@ private void appendClientPortToCallerContextIfAbsent() {
               .append(CallerContext.CLIENT_PORT_STR, 
String.valueOf(Server.getRemotePort()))
               .setSignature(origSignature)
               .build());
+    } else {
+      String origContext = ctx == null ? null : ctx.getContext();
+      byte[] origSignature = ctx == null ? null : ctx.getSignature();

Review Comment:
   if ctx was null , it should not add dfsrouterPort because the rpc call is 
directory connect namenode.  
   When a rpc call is form dfsrouter, it will call 
RouterRpcClient.addClientInfoToCallerContext method to add clientIP and 
clientPort.



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