mridulm commented on code in PR #3248:
URL: https://github.com/apache/celeborn/pull/3248#discussion_r2223704605
##########
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:
Looks like the PR got merged before this was addressed.
If this is not a concern, that should be fine - else let us do a follow up.
--
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]