[ 
https://issues.apache.org/jira/browse/HDFS-5077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Plamen Jeliazkov updated HDFS-5077:
-----------------------------------

    Attachment: HDFS-5077_2.patch

Yes, that was a bad patch. Apologizes.

I re-worked it to look much closer to the 2) route. We will no longer throw an 
Exception. If indeed all the newtargets were null then that would be an 
indication of a missing block; for which there is nothing we can do.

The current patch basically adds all found targets to a list and converts that 
list back to an array at the end of the call; skipping any targets discovered 
to be null.
For a little while the block will be under-replicated but should catch up thru 
block replication thread.

I included a unit test to show that non-existant target does not fail the call.
                
> NPE in FSNamesystem.commitBlockSynchronization()
> ------------------------------------------------
>
>                 Key: HDFS-5077
>                 URL: https://issues.apache.org/jira/browse/HDFS-5077
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>    Affects Versions: 2.0.5-alpha
>            Reporter: Konstantin Shvachko
>            Assignee: Plamen Jeliazkov
>         Attachments: HDFS-5077_2.patch, HDFS-5077.patch
>
>
> NN starts a block recovery, which will synchronize block replicas on 
> different DNs. In the end one of DNs will report the list of the nodes 
> containing the consistent replicas to the NN via commitBlockSynchronization() 
> call. The NPE happens if just before processing commitBlockSynchronization() 
> NN removes from active one of DNs that are then reported in the call.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to