[CELEBORN-777][FOLLOWUP] CongestionControl getPotentialConsumeSpeed throw … …/zero error

### What changes were proposed in this pull request?
Fix compute bug

### Why are the changes needed?

### Does this PR introduce _any_ user-facing change?

### How was this patch tested?

Closes #1693 from AngersZhuuuu/CELEBORN-777.

Authored-by: Angerszhuuuu <angers.zhu@gmail.com>
Signed-off-by: zky.zhoukeyong <zky.zhoukeyong@alibaba-inc.com>
This commit is contained in:
Angerszhuuuu 2023-07-10 10:37:19 +08:00 committed by zky.zhoukeyong
parent 52dcd3b5df
commit fd82855e8b

View File

@ -78,7 +78,7 @@ public class BufferStatusHub extends TimeSlidingHub<BufferStatusHub.BufferStatus
Pair<BufferStatusNode, Integer> sumInfo = sum();
long currentNumBytes = sumInfo.getKey().numBytes();
if (currentNumBytes > 0) {
return currentNumBytes * 1000 / (long) sumInfo.getRight() * intervalPerBucketInMills;
return currentNumBytes * 1000 / ((long) sumInfo.getRight() * intervalPerBucketInMills);
}
return 0L;
}