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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]