You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Wei-Chiu Chuang (Jira)" <ji...@apache.org> on 2020/05/06 19:25:00 UTC

[jira] [Commented] (HDFS-14999) Avoid Potential Infinite Loop in DFSNetworkTopology

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

Wei-Chiu Chuang commented on HDFS-14999:
----------------------------------------

[~zgw] i saw you posted a patch. Is that the fix for this issue, and is it ready for precommit test?

Some quick comments:
* do you have a test?
* would you please update the comments / javadocs in the code?
{code}
    // to this point, it is guaranteed that there is at least one node
    // that satisfies the requirement, keep trying until we found one.
    Node chosen;
{code}

{code}
  /**
   * Choose a random node that has the required storage type, under the given
   * root, with an excluded subtree root (could also just be a leaf node).
   *
   * Note that excludedNode is checked after a random node, so it is not being
   * handled here.
{code}
both are not accurate after this patch.

> 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
>         Attachments: InfiniteLoop.patch
>
>
> {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-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org