This is an automated email from the ASF dual-hosted git repository.

zhouky pushed a commit to branch branch-0.3
in repository https://gitbox.apache.org/repos/asf/incubator-celeborn.git


The following commit(s) were added to refs/heads/branch-0.3 by this push:
     new 9fdc28282 [CELEBORN-1036][FOLLOWUP] When inflightBatchesPerAddress 
clear, totalInflightReqs should reset
9fdc28282 is described below

commit 9fdc28282e3a1d264b9c80f3774fea3a2d27741e
Author: liangyongyuan <[email protected]>
AuthorDate: Wed Dec 27 16:10:12 2023 +0800

    [CELEBORN-1036][FOLLOWUP] When inflightBatchesPerAddress clear, 
totalInflightReqs should reset
    
    ### What changes were proposed in this pull request?
    When   `inflightBatchesPerAddress`  clear in  
`InFlightRequestTracker.cleanup `, `totalInflightReqs` should also reset to 
avoid getting stuck when exiting.
    
    ### Why are the changes needed?
    `inflightBatchesPerAddress` has cleared and be empty,but totalInflightReqs 
is always bigger than 0.
    
![image](https://github.com/apache/incubator-celeborn/assets/46274164/28223f1e-ac9b-4e0b-a26d-9b529af6bca1)
    
    This occurred during the first attempt of the task, where the request for 
map end failed, but the driver marked that the map has already ended.
    
![image](https://github.com/apache/incubator-celeborn/assets/46274164/7f43d808-2f9b-4775-b04f-30afe4d31e5a)
    
    ### Does this PR introduce _any_ user-facing change?
    No
    
    ### How was this patch tested?
    through exists uts
    
    Closes #2191 from lyy-pineapple/celebron-1036.
    
    Authored-by: liangyongyuan <[email protected]>
    Signed-off-by: zky.zhoukeyong <[email protected]>
    (cherry picked from commit f8eb1605a11a5dd7d1c491dce30c873bbbd9f5e7)
    Signed-off-by: zky.zhoukeyong <[email protected]>
---
 .../java/org/apache/celeborn/common/write/InFlightRequestTracker.java    | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/common/src/main/java/org/apache/celeborn/common/write/InFlightRequestTracker.java
 
b/common/src/main/java/org/apache/celeborn/common/write/InFlightRequestTracker.java
index ba2ad1f98..9350c09ef 100644
--- 
a/common/src/main/java/org/apache/celeborn/common/write/InFlightRequestTracker.java
+++ 
b/common/src/main/java/org/apache/celeborn/common/write/InFlightRequestTracker.java
@@ -182,6 +182,7 @@ public class InFlightRequestTracker {
     if (!inflightBatchesPerAddress.isEmpty()) {
       logger.warn("Clear {}", this.getClass().getSimpleName());
       inflightBatchesPerAddress.clear();
+      totalInflightReqs.reset();
     }
     pushStrategy.clear();
   }

Reply via email to