Yuyang Lan created HDFS-4788:
--------------------------------

             Summary: Fix bug in bestNode function which caused 'Could not 
reach the block' exception even when there're nodes available
                 Key: HDFS-4788
                 URL: https://issues.apache.org/jira/browse/HDFS-4788
             Project: Hadoop HDFS
          Issue Type: Bug
            Reporter: Yuyang Lan


class: org.apache.hadoop.hdfs.server.common.JspHelper
function: bestNode(DatanodeInfo[] nodes, boolean doRandom, Configuration conf)

This function is supposed to return the first (random) health node by 
performing socket check,
but a bug caused the 'chosenNode' variable is actually only assigned at the 1st 
time,
So if the first picked node is a dead one, then the socket check will fail 3 
times against it in a row
and finally throw a "Could not reach the block containing the data" IOException,
no matter if other nodes are alive or not.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to