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

Kuhu Shukla updated HDFS-11797:
-------------------------------
    Attachment: HDFS-11797.001.patch

For HDFS-9958 case we did manage to find a stack trace after some searching 
which pointed to corrupt replica being on a failed volume. After that fix, the 
latest case is different since no failed volumes are involved and unlike last 
time I could not find a stack trace to support this exception. Clearly there 
are other scenarios where this inconsistency can happen. However, triggering a 
full block report from the nodes having the replica got rid of this bad state. 
[~jojochuang], since the cause of this is not known and the the one caused by 
volume failures has been addressed, my approach for this JIRA was to allocate 
the array to numNodes size and let the {{j < numMachines}} logic take care of 
truncating the array if needed in any rare case. 

The patch does not have a test yet. Appreciate any thoughts on this approach to 
the fix.

> BlockManager#createLocatedBlocks() can throw ArrayIndexOutofBoundsException 
> when corrupt replicas are inconsistent
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-11797
>                 URL: https://issues.apache.org/jira/browse/HDFS-11797
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Kuhu Shukla
>            Assignee: Kuhu Shukla
>            Priority: Critical
>         Attachments: HDFS-11797.001.patch
>
>
> The calculation for {{numMachines}} can be too less (causing 
> ArrayIndexOutOfBoundsException) or too many (causing NPE (HDFS-9958)) if data 
> structures find inconsistent number of corrupt replicas. This was earlier 
> found related to failed storages. This JIRA tracks a change that works for 
> all possible cases of inconsistencies.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to