[ https://issues.apache.org/jira/browse/HDFS-15630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17215137#comment-17215137 ]
Hui Fei commented on HDFS-15630: -------------------------------- [~smarthan] Thanks for you patch. Some comments {code:java} + if (clientIp == null || clientIp.length() == 0) { + return; + } {code} Client ip will not be null or empty? {code:java} + if (origContext != null && origContext.contains(clientIp)) { + return; + } {code} context contains clientIp:x.x.x.x because the callercontext added clientip is used again? If the param callercontext is the original one remote client sends, we use that and it will not be a problem? {code:java} - // Current callerContext is null - assertNull(CallerContext.getCurrent()); - // Set client context CallerContext.setCurrent( new CallerContext.Builder("clientContext").build()); + // Assert the initial caller context as expected + assertEquals("clientContext", CallerContext.getCurrent().getContext()); + {code} Why remove the assert? Feel strange context is not null before we set. {code:java} + String expectContext = "callerContext=clientContext,clientIp:" + + InetAddress.getLocalHost().getHostAddress(); {code} Not sure that Whether it is expected when a machine has more eth interfaces, pending jenkins > RBF: Fix wrong client IP info in CallerContext when requests mount points > with multi-destinations. > -------------------------------------------------------------------------------------------------- > > Key: HDFS-15630 > URL: https://issues.apache.org/jira/browse/HDFS-15630 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: rbf > Reporter: Chengwei Wang > Assignee: Chengwei Wang > Priority: Major > Attachments: HDFS-15630.001.patch, HDFS-15630.002.patch, > HDFS-15630.003.patch > > > There are two issues about client IP info in CallerContext when we try to > request mount points with multi-destinations. > # the clientIp would duplicate in CallerContext when > RouterRpcClient#invokeSequential. > # the clientIp would miss in CallerContext when > RouterRpcClient#invokeConcurrent. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org