mridulm commented on code in PR #3248:
URL: https://github.com/apache/celeborn/pull/3248#discussion_r2222783505
##########
common/src/main/java/org/apache/celeborn/common/write/InFlightRequestTracker.java:
##########
@@ -99,15 +136,19 @@ public boolean limitMaxInFlight(String hostAndPushPort)
throws IOException {
int currentMaxReqsInFlight =
pushStrategy.getCurrentMaxReqsInFlight(hostAndPushPort);
Set<Integer> batchIdSet = getBatchIdSetByAddressPair(hostAndPushPort);
+ LongAdder batchBytesSize = getBatchBytesSizeByAddressPair(hostAndPushPort);
long times = waitInflightTimeoutMs / delta;
try {
while (times > 0) {
if (cleaned) {
// MapEnd cleans up push state, which does not exceed the max
requests in flight limit.
return false;
} else {
- if (totalInflightReqs.sum() <= maxInFlightReqsTotal
- && batchIdSet.size() <= currentMaxReqsInFlight) {
+ if ((totalInflightReqs.sum() <= maxInFlightReqsTotal
+ && batchIdSet.size() <= currentMaxReqsInFlight)
+ || (maxInFlightBytesSizeEnabled
+ && totalInflightBytes.sum() <= maxInFlightBytesSizeTotal
+ && batchBytesSize.sum() <= maxInFlightBytesSizePerWorker)) {
Review Comment:
My earlier query was, should this be `||` ?
As in, either total inflight is high, or inflight to a specific worker is
high (assuming per worker threshold is lower than total !)
```suggestion
|| (maxInFlightBytesSizeEnabled && (
totalInflightBytes.sum() <= maxInFlightBytesSizeTotal ||
batchBytesSize.sum() <= maxInFlightBytesSizePerWorker))) {
```
--
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]