[ https://issues.apache.org/jira/browse/HDFS-15630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17216160#comment-17216160 ]
Chengwei Wang commented on HDFS-15630: -------------------------------------- [~ferhui], [~elgoiri], thanks for the comments. {quote}Client ip will not be null or empty? {quote} It makes no sense if the client ip is null or empty, it won't be added to CallerContext as it would be regarded as invalid, so I think it's better to fail-fast. {quote}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? {quote} Yes, it would be a problem if the client ip string already exsits when we only check the ip string, so the check condition should change as context.contains("clientIp:x.x.x.x"). Then it would be ok to skip to add the duplicated client ip to context even if the ip was added by other clients, because we could also get correct clinet ip in server side which would meet our needs. What do you think? {quote}Why remove the assert? Feel strange context is not null before we set. {quote} I removed the assert because I set caller context in the new unit test, which would lead to this assert failed. To avoid confusion,I would recover TestRouterRpc#testMkdirsWithCallerContext(), and do all the checks in the new UT. {quote}Not sure that Whether it is expected when a machine has more eth interfaces {quote} It would fail if some other infos added to the caller context, so it'better to parse out the client ip info first,and check the ip then. {quote}Let's put the full javadoc for the old invokeMethod signature and just add "Set clientIp and callerContext get from server context." at the end of the description. {quote} Ok, I would add javadoc as you said. > 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