sodonnel commented on a change in pull request #1551: HDDS-2199 In
SCMNodeManager dnsToUuidMap cannot track multiple DNs on the same host
URL: https://github.com/apache/hadoop/pull/1551#discussion_r330481300
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMBlockProtocolServer.java
##########
@@ -295,7 +297,33 @@ public ScmInfo getScmInfo() throws IOException {
boolean auditSuccess = true;
try{
NodeManager nodeManager = scm.getScmNodeManager();
- Node client = nodeManager.getNodeByAddress(clientMachine);
Review comment:
I am not certain how this sortDatanodes() call is used. Is it on the read
path or write path? I was assuming it was on the read path, but write path may
be different if all the cluster DNs are passed into the method - then you would
always get a match.
A list of DNs (UUIDs) are passed into the method, and then we retrieve a
list of DatanodeDetails running on the client machine. The client machine can
then be set to one of those DatanodeDetails, but it is not guaranteed that the
first in the list will match on of the UUIDs passed into the method.
Eg this is passed in:
DN0, DN5, DN10, DN15
On the client machine is:
DN1, DN6, DN10 and DN16
So only DN10 is a match with one that is passed it. If we just picked the
first one (DN1) it would look like there is no DN on the client machine and
then when the list and client machine are passed into sortByDistanceCost() at
line 355, it would not give the expected result.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]