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

Vinayakumar B commented on HDFS-7342:
-------------------------------------

bq. With HDFS-5558 fix, I assume the case that both the penultimate and the 
last block are COMMITTED could be possible
I agree, this is possible only in case of {{commitBlockSynchronization()}} and 
finalize fails. But as of now this also removes the lease, and which will not 
be added back immediately. Lease will be present in the Standby NN, or it will 
come back after NN restart. Note that at that time also last Block state will 
be UNDER_CONSTRUCTION not COMMITTED. COMMITTED state is only at ACTIVE NN side.

bq. in scenario#1 described in that comment, if both blocks have minimal 
replication number of blocks, there would be an exception thrown because the 
method finalizeINodeFileUnderConstruction that calls:
If any COMMITTED blocks reaches minReplication, state will be automatically 
changed to COMPLETE while processing that IBR itself. Need not be user call. So 
there is no chance of COMMITTED block state with minReplication met. right?

One more thing I have observed was, In this state, where penultimate was not 
having minReplication(=2) replicas, but had only one replica, restarted the 
Namenode, and NN scheduled replication for penultimate block and replicated 
successfully even before lease recovery was triggered. Later lease recovery was 
successful as everything was OK.

How about scheduling replication during the lease recovery for such penultimate 
blocks with atleast one replica available to satisfy min-replication, then go 
ahead for lease recovery. Till now this situation might not have experienced as 
minReplication itself by default was 1. 

Any thoughts...?

> Lease Recovery doesn't happen some times
> ----------------------------------------
>
>                 Key: HDFS-7342
>                 URL: https://issues.apache.org/jira/browse/HDFS-7342
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 2.0.0-alpha
>            Reporter: Ravi Prakash
>            Assignee: Ravi Prakash
>         Attachments: HDFS-7342.1.patch, HDFS-7342.2.patch
>
>
> In some cases, LeaseManager tries to recover a lease, but is not able to. 
> HDFS-4882 describes a possibility of that. We should fix this



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to