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

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

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


##########
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:
   PushData may probably throw runtimeException, then`asyncPushing.release()` better move to finally block.



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