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

Arpit Agarwal commented on HDFS-7924:
-------------------------------------

Likely hitting this code in {{FsNameSystem#internalReleaseLease}}

{code}
      // start recovery of the last block for this file
      long blockRecoveryId = nextGenerationStamp(isLegacyBlock(uc));
      lease = reassignLease(lease, src, recoveryLeaseHolder, pendingFile);
      uc.initializeBlockRecovery(blockRecoveryId);
      leaseManager.renewLease(lease);
      // Cannot close file right now, since the last block requires recovery.
      // This may potentially cause infinite loop in lease recovery
      // if there are no valid replicas on data-nodes.
      NameNode.stateChangeLog.warn(
                "DIR* NameSystem.internalReleaseLease: " +
                "File " + src + " has not been closed." +
               " Lease recovery is in progress. " +
                "RecoveryId = " + blockRecoveryId + " for block " + lastBlock);
{code}

We worked around the issue by deleting the empty file. Unfortunately logs and 
any other debugging information were lost.

Possibly related to https://issues.apache.org/jira/browse/HDFS-4516, which is 
fixed in 2.6.0.

> NameNode goes into infinite lease recovery
> ------------------------------------------
>
>                 Key: HDFS-7924
>                 URL: https://issues.apache.org/jira/browse/HDFS-7924
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs-client, namenode
>    Affects Versions: 2.6.0
>            Reporter: Arpit Agarwal
>
> We encountered an HDFS lease recovery issue. All DataNodes+NameNodes were 
> restarted while a client was running. A block was created on the NN but it 
> had not yet been created on DNs. The NN tried to recover the lease for the 
> block on restart but was unable to do so getting into an infinite loop.



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

Reply via email to