Details
Description
The method of FSNamesystem#internalReleaseLease() as follow:
boolean internalReleaseLease(Lease lease, String src, INodesInPath iip, String recoveryLeaseHolder) throws IOException { ... // Start recovery of the last block for this file // Only do so if there is no ongoing recovery for this block, // or the previous recovery for this block timed out. if (blockManager.addBlockRecoveryAttempt(lastBlock)) { long blockRecoveryId = nextGenerationStamp( blockManager.isLegacyBlock(lastBlock)); if(copyOnTruncate) { lastBlock.setGenerationStamp(blockRecoveryId); } else if(truncateRecovery) { recoveryBlock.setGenerationStamp(blockRecoveryId); } uc.initializeBlockRecovery(lastBlock, blockRecoveryId, true); // 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); } lease = reassignLease(lease, src, recoveryLeaseHolder, pendingFile); leaseManager.renewLease(lease); break; } return false; }
Call LeaseManager#renewLease in FSNamesystem#reassignLease=>FSNamesystem#reassignLeaseInternal.
So no need to call LeaseManager#renewLease again after leaseManager#renewLease.
Attachments
Attachments
Issue Links
- relates to
-
HDFS-11576 Block recovery will fail indefinitely if recovery time > heartbeat interval
- Resolved