FMX commented on code in PR #2134:
URL:
https://github.com/apache/incubator-celeborn/pull/2134#discussion_r1426108486
##########
common/src/main/java/org/apache/celeborn/common/write/InFlightRequestTracker.java:
##########
@@ -58,11 +55,10 @@ public InFlightRequestTracker(CelebornConf conf, PushState
pushState) {
}
public void addBatch(int batchId, String hostAndPushPort) {
- Set<Integer> batchIdSetPerPair =
+ Set<Integer> batchIdSet =
inflightBatchesPerAddress.computeIfAbsent(
hostAndPushPort, id -> ConcurrentHashMap.newKeySet());
- batchIdSetPerPair.add(batchId);
- totalInflightReqs.increment();
+ batchIdSet.add(batchId);
}
public void removeBatch(int batchId, String hostAndPushPort) {
Review Comment:
I mean that you can invoke `totalInflightReqs.decrement()` if the
`batchIdSet` is not null.
--
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]