ZanderXu opened a new pull request, #4840:
URL: https://github.com/apache/hadoop/pull/4840
### Description of PR
During looking into the logic of RecoverLease, I guess there is a bug:
```
int nrCompleteBlocks;
BlockInfo curBlock = null;
for(nrCompleteBlocks = 0; nrCompleteBlocks < nrBlocks; nrCompleteBlocks++) {
curBlock = blocks[nrCompleteBlocks];
if(!curBlock.isComplete())
break;
// Why?
assert blockManager.hasMinStorage(curBlock) :
"A COMPLETE block is not minimally replicated in " + src;
}
```
RecoverLease just try to align all replicas of the last block of one
UnderConstruct file.
So if the UC file with some completed blocks, which may missed all replicas,
should be able to recoverLease.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]