pan3793 commented on code in PR #1807:
URL: 
https://github.com/apache/incubator-celeborn/pull/1807#discussion_r1292929817


##########
client-spark/common/src/main/java/org/apache/spark/shuffle/celeborn/SortBasedPusher.java:
##########
@@ -267,13 +268,18 @@ public boolean insertRecord(
   }
 
   public void triggerPush() throws IOException {
-    asyncPushing = true;
+    try {
+      asyncPushing.acquire();
+    } catch (InterruptedException e) {
+      logger.error("SortBasedPusher thread interrupted while waiting push 
finished.");
+      TaskInterruptedHelper.throwTaskKillException();
+    }
     dataPusher.checkException();
     executorService.submit(
         () -> {
           try {
             pushData();
-            asyncPushing = false;
+            asyncPushing.release();

Review Comment:
   I'm not sure about the original design detail here, but seems it's correct 
we should abandon the pusher when something is wrong during the push rather 
than continue.



-- 
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]

Reply via email to