[ 
https://issues.apache.org/jira/browse/HDFS-14999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16979528#comment-16979528
 ] 

Ayush Saxena commented on HDFS-14999:
-------------------------------------

Thanx [~weichiu] for the pointers.
Yes, HADOOP-151317 discussed this problem of infinite loop only, but it 
concluded in a way not eliminating the loop. [~xiaochen] started discussion 
with having a termination condition for the loop, but in the end, they didn't 
conclude.
Any suggestions on having a termination condition? Maybe some considerably 
large number? Or if you have any idea or suggestion on this or remember 
something from the discussions that time, could really help. :)

> Avoid Potential Infinite Loop in DFSNetworkTopology
> ---------------------------------------------------
>
>                 Key: HDFS-14999
>                 URL: https://issues.apache.org/jira/browse/HDFS-14999
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Ayush Saxena
>            Assignee: Ayush Saxena
>            Priority: Major
>
> {code:java}
>     do {
>       chosen = chooseRandomWithStorageTypeAndExcludeRoot(root, excludeRoot,
>           type);
>       if (excludedNodes == null || !excludedNodes.contains(chosen)) {
>         break;
>       } else {
>         LOG.debug("Node {} is excluded, continuing.", chosen);
>       }
>     } while (true);
> {code}
> Observed this loop getting stuck as part of testing HDFS-14913.
> There should be some exit condition or max retries here



--
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

Reply via email to