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

liugddx pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/seatunnel.git


The following commit(s) were added to refs/heads/dev by this push:
     new b533364768 Fix job will never cancel success when JobMaster init not 
complete (#6885)
b533364768 is described below

commit b5333647688c656e6c749931b260b4bd81399ec9
Author: Eric <[email protected]>
AuthorDate: Wed May 22 21:24:41 2024 +0800

    Fix job will never cancel success when JobMaster init not complete (#6885)
---
 .../java/org/apache/seatunnel/engine/server/master/JobMaster.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/master/JobMaster.java
 
b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/master/JobMaster.java
index ece0c18c93..7c7b26fa16 100644
--- 
a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/master/JobMaster.java
+++ 
b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/master/JobMaster.java
@@ -180,7 +180,7 @@ public class JobMaster {
         this.seaTunnelServer = seaTunnelServer;
     }
 
-    public void init(long initializationTimestamp, boolean restart) throws 
Exception {
+    public synchronized void init(long initializationTimestamp, boolean 
restart) throws Exception {
         jobImmutableInformation =
                 
nodeEngine.getSerializationService().toObject(jobImmutableInformationData);
         jobCheckpointConfig =
@@ -490,7 +490,7 @@ public class JobMaster {
                 "can't find task group address from taskGroupLocation: " + 
taskGroupLocation);
     }
 
-    public void cancelJob() {
+    public synchronized void cancelJob() {
         physicalPlan.cancelJob();
     }
 

Reply via email to