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

hemanthboyina commented on HDFS-14778:
--------------------------------------

+HDFS-9958+ added null check , if the storage is null to return ,
{code:java}
  if (storageID != null) {
      storage = node.getStorageInfo(storageID);
  } 
  if (storage == null) {
       storage = storedBlock.findStorageInfo(node);    
  }
  if (storage == null) {     
       blockLog.debug("BLOCK* findAndMarkBlockAsCorrupt: {} not found on 
{}",blk, dn);
   return;    
  } {code}
    they missed out an extra check  , we should have a check if the storage 
state is failed , we shouldn't create a block if storage state is failed 
can refer the scenario from +HDFS-9958+

> BlockManager findAndMarkBlockAsCorrupt adds block to the map if the Storage 
> state is failed
> -------------------------------------------------------------------------------------------
>
>                 Key: HDFS-14778
>                 URL: https://issues.apache.org/jira/browse/HDFS-14778
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: hemanthboyina
>            Assignee: hemanthboyina
>            Priority: Major
>         Attachments: HDFS-14778.001.patch
>
>
> Should not mark the block as corrupt if the storage state is failed



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

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

Reply via email to