HDFS-12891. Do not invalidate blocks if toInvalidate is empty. Contributed by Zsolt Venczel.
This commit is contained in:
parent
5cd1056ad7
commit
55fc2d6485
|
@ -293,10 +293,12 @@ class InvalidateBlocks {
|
|||
getBlocksToInvalidateByLimit(nodeToECBlocks.get(dn),
|
||||
toInvalidate, numECBlocks, remainingLimit);
|
||||
}
|
||||
if (toInvalidate.size() > 0 && getBlockSetsSize(dn) == 0) {
|
||||
remove(dn);
|
||||
if (toInvalidate.size() > 0) {
|
||||
if (getBlockSetsSize(dn) == 0) {
|
||||
remove(dn);
|
||||
}
|
||||
dn.addBlocksToBeInvalidated(toInvalidate);
|
||||
}
|
||||
dn.addBlocksToBeInvalidated(toInvalidate);
|
||||
return toInvalidate;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue