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

Uma Maheswara Rao G commented on HDFS-5443:
-------------------------------------------

{quote}
problem of 0-sized blocks is there with normal files also (HDFS-4516), but that 
will not cause in NN safemode because file will be an under construction file 
and 0-sized block will not be counted in safemode threshold.
{quote}
Yep, This JIRA explains the same. Please see description and first comment.

{quote}
ut counting them also in safemode threshold as these are loaded as COMPLETE 
blocks
{quote}
Here point was we no need to keep them in snapshotted files.(There was 
inconsistency in the flow) . If there is simple way to wipe out all the file 
0-sized blocks consistently in someway, that will be good to address this. 
Anyway, leases maintaining may solve as that will be same as normal file UC.
Let Sathish verify this with that patch. 
But I am little uncomfortable for managing leases for snapshotted files as they 
are readonly files, no need of leases. If all others ok on that point, I will 
not object.


> Namenode can stuck in safemode on restart if it crashes just after addblock 
> logsync and after taking snapshot for such file.
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-5443
>                 URL: https://issues.apache.org/jira/browse/HDFS-5443
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: snapshots
>    Affects Versions: 3.0.0, 2.2.0
>            Reporter: Uma Maheswara Rao G
>            Assignee: sathish
>         Attachments: 5443-test.patch
>
>
> This issue is reported by Prakash and Sathish.
> On looking into the issue following things are happening.
> .
> 1) Client added block at NN and just did logsync
>    So, NN has block ID persisted.
> 2)Before returning addblock response to client take a snapshot for root or 
> parent directories for that file
> 3) Delete parent directory for that file
> 4) Now crash the NN with out responding success to client for that addBlock 
> call
> Now on restart of the Namenode, it will stuck in safemode.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to