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

Colin Patrick McCabe commented on HDFS-5589:
--------------------------------------------

Good work-- it's great to have finally found that bug.

{code}
+      DatanodeDescriptor datanode = chooseDatanodeForCaching(possibilities,
+          blockManager.getDatanodeManager().getStaleInterval());
+      assert (datanode != null);
{code}

Don't we need to handle the case where {{datanode == null}} here?  It seems 
like that will come up if, for example, we have no space available on any 
datanode.  It might be better to move the code from {{if 
(possibilities.isEmpty()) }} if statement into a new check for 
{{chooseDataNodeForCaching == null}}.  It would be nice to see for this case 
too-- just fill up the DN caches, or set them to 0...

> Namenode loops caching and uncaching when data should be uncached
> -----------------------------------------------------------------
>
>                 Key: HDFS-5589
>                 URL: https://issues.apache.org/jira/browse/HDFS-5589
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: caching, namenode
>    Affects Versions: 3.0.0
>            Reporter: Andrew Wang
>            Assignee: Andrew Wang
>         Attachments: hdfs-5589-1.patch
>
>
> This was reported by [~cnauroth] and [~brandonli], and [~schu] repro'd it too.
> If you add a new caching directive then remove it, the Namenode will 
> sometimes get stuck in a loop where it sends DNA_CACHE and then DNA_UNCACHE 
> repeatedly to the datanodes where the data was previously cached.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to