fapifta commented on pull request #3579: URL: https://github.com/apache/hadoop/pull/3579#issuecomment-961304051
@symious Let me correct a bit about the case, but in general you see it the right way. We have a code that uses FS API to connect to the cluster. This code creates client A and B. During creating client A and B, an AtomicBoolean (fallbackToSimpleAuth) instance is created. Client A and B connects to the same DataNode D, A first, then B later. During setting up the connection for client A, setupIOStreams sets the fallbackToSimpleAuth instance of client A, and then later on as the connection between the host running the code and the DataNode D is already established, client B re-uses that connection, and skips setupIOStreams, so the fallbackToSimpleAuth instance of client B remains false. Due to this, the SaslRPCClient in client B does not fall back to simple auth but tries to do a SASL handshake which is not expected by DataNode D. Your suggestion to add the client's ID to the ConnectionID would help, but there is a tradeoff there, as in this case client B has to set up a new socket connection to DataNode D. That would cause two things: 1. is an overhead of creating a new connection instead of reusing what we already have. 2. is an overhead in DataNodes, as in this case a second client instance would use an other socket in a separate transciever in the DataNode Because of this I am reluctant to modify the behaviour in a way where we start to use multiple connections towards the same DataNode from one single client code. -- 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]
