Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Cannot Reproduce
-
2.1.0-beta, 3.0.0-alpha1
-
None
-
None
-
None
Description
JspHelper#bestNode() doesn't handle correctly if the chosen datanode is down.
while (s == null) { if (chosenNode == null) { do { if (doRandom) { index = DFSUtil.getRandom().nextInt(nodes.length); } else { index++; } chosenNode = nodes[index]; } while (deadNodes.contains(chosenNode)); } chosenNode = nodes[index];
In this part of the code, choosing the datanode will be done only once.
If the chosen datanode is down, then definitely exception will be thrown instead of re-chosing the available node.