HDFS-9535. Newly completed blocks in IBR should not be considered under-replicated too quickly. Contributed by Mingliang Liu.

This commit is contained in:
Jing Zhao 2015-12-14 11:05:09 -08:00
parent f229772f99
commit e534569814
2 changed files with 6 additions and 0 deletions

View File

@ -1751,6 +1751,9 @@ Release 2.8.0 - UNRELEASED
HDFS-9514. TestDistributedFileSystem.testDFSClientPeerWriteTimeout failing;
exception being swallowed. (Wei-Chiu Chuang via Yongjun Zhang)
HDFS-9535. Newly completed blocks in IBR should not be considered
under-replicated too quickly. (Mingliang Liu via jing9)
OPTIMIZATIONS
HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than

View File

@ -2866,6 +2866,9 @@ public class BlockManager implements BlockStatsMXBean {
if(storedBlock.getBlockUCState() == BlockUCState.COMMITTED &&
hasMinStorage(storedBlock, numLiveReplicas)) {
if (!bc.isStriped()) {
addExpectedReplicasToPending(storedBlock);
}
completeBlock(storedBlock, false);
} else if (storedBlock.isComplete() && result == AddBlockResult.ADDED) {
// check whether safe replication is reached for the block