You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@celeborn.apache.org by "pan3793 (via GitHub)" <gi...@apache.org> on 2023/08/14 03:04:47 UTC

[GitHub] [incubator-celeborn] pan3793 commented on a diff in pull request #1807: [CELEBORN-891] Race condition when pipeline is enabled

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: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org