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 "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2026/10/21 19:37:00 UTC

[jira] [Commented] (HDFS-18014) Slow peer lookup in DatanodeManager fails for IPv6 DataNodes

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

ASF GitHub Bot commented on HDFS-18014:
---------------------------------------

smengcl opened a new pull request, #8852:
URL: https://github.com/apache/hadoop/pull/8852

   Generated-by: Claude Code (Opus 5.5)
   
   ### Description of PR
   
   `DatanodeManager#getDnDescriptorsFromIpAddr` took the host from a slow peer key with `split(":")[0]`. For an IPv6 info address such as `2001:db8::1:9864` or `[2001:db8::1]:9864` that yields `2001` or `[2001`, so the DataNode was never found and slow node exclusion did nothing on IPv6 clusters.
   
   The host is now everything before the last `:`, with surrounding brackets removed. IPv4 and hostname keys parse the same as before.
   
   ### How was this patch tested?
   
   Added `TestDatanodeManager#testSlowPeersResolvedForIpv4AndIpv6`, which registers IPv4 and IPv6 DataNodes, reports them as slow peers using plain IPv4, plain IPv6 and bracketed IPv6 info addresses, and checks that `getAllSlowDataNodes` returns all three. It fails without the fix. `TestReplicationPolicyExcludeSlowNodes` still passes.
   
   ### For code changes:
   
   - [x] Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
   - [ ] Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
   - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, `NOTICE-binary` files?
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   




> Slow peer lookup in DatanodeManager fails for IPv6 DataNodes
> ------------------------------------------------------------
>
>                 Key: HDFS-18014
>                 URL: https://issues.apache.org/jira/browse/HDFS-18014
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>            Reporter: Siyao Meng
>            Assignee: Siyao Meng
>            Priority: Major
>              Labels: ipv6
>
> {{DatanodeManager#getDnDescriptorsFromIpAddr}} extracts the host from each slow peer key with {{node.split(":")[0]}}. The keys are DataNode info addresses ({{DatanodeID#getInfoAddr()}} or {{getInfoSecureAddr()}}) recorded by {{BlockReceiver}} and stored by {{SlowPeerTracker#addReport}}.
> For an IPv6 DataNode the key is {{2001:db8::1:9864}} (or {{[2001:db8::1]:9864}} once HDFS-18010 brackets IPv6 literals), so the extracted host is {{2001}} (or {{[2001}}). {{Host2NodesMap#getDatanodeByHost}} never finds the node, so {{getSlowPeersUuidSet}} and {{getAllSlowDataNodes}} return nothing for IPv6 DataNodes and {{dfs.namenode.block-placement-policy.exclude-slow-nodes.enabled}} has no effect on them.
> Fix: take the host as everything before the last {{:}} and strip surrounding brackets. IPv4 and hostname keys parse the same as before.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org