In Balancer, the target task should be removed when its size < 0. Contributed by Yiqun Lin

This commit is contained in:
Tsz-Wo Nicholas Sze 2016-08-04 09:45:40 -07:00
parent c7fe1f5ec5
commit 5004b0571e
1 changed files with 1 additions and 1 deletions

View File

@ -734,7 +734,7 @@ public class Dispatcher {
long blockSize = pendingBlock.block.getNumBytes(); long blockSize = pendingBlock.block.getNumBytes();
incScheduledSize(-blockSize); incScheduledSize(-blockSize);
task.size -= blockSize; task.size -= blockSize;
if (task.size == 0) { if (task.size <= 0) {
i.remove(); i.remove();
} }
return pendingBlock; return pendingBlock;