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

morningman pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new d78dbf3ed7f [fix](Export) fix dead lock of parallel Exporting (#43097)
d78dbf3ed7f is described below

commit d78dbf3ed7fb70009b9a2538fcaf534630ae9a31
Author: Tiewei Fang <43782773+bepppo...@users.noreply.github.com>
AuthorDate: Sat Nov 2 08:54:36 2024 +0800

    [fix](Export) fix dead lock of parallel Exporting (#43097)
    
    bp: #43083
---
 fe/fe-core/src/main/java/org/apache/doris/load/ExportJob.java  | 7 +++----
 fe/fe-core/src/main/java/org/apache/doris/persist/EditLog.java | 4 ++--
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/load/ExportJob.java 
b/fe/fe-core/src/main/java/org/apache/doris/load/ExportJob.java
index 938a9d7711a..63d88de46af 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/load/ExportJob.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/load/ExportJob.java
@@ -665,7 +665,7 @@ public class ExportJob implements Writable {
         }
         // we only persist Pending/Cancel/Finish state
         if (!isReplay && newState != JobState.IN_QUEUE && newState != 
JobState.EXPORTING) {
-            Env.getCurrentEnv().getEditLog().logExportUpdateState(id, 
newState);
+            Env.getCurrentEnv().getEditLog().logExportUpdateState(this, 
newState);
         }
         return true;
     }
@@ -846,10 +846,9 @@ public class ExportJob implements Writable {
         }
 
         // used for persisting one log
-        public StateTransfer(long jobId, JobState state) {
-            this.jobId = jobId;
+        public StateTransfer(ExportJob job, JobState state) {
+            this.jobId = job.getId();
             this.state = state;
-            ExportJob job = Env.getCurrentEnv().getExportMgr().getJob(jobId);
             this.startTimeMs = job.getStartTimeMs();
             this.finishTimeMs = job.getFinishTimeMs();
             this.failMsg = job.getFailMsg();
diff --git a/fe/fe-core/src/main/java/org/apache/doris/persist/EditLog.java 
b/fe/fe-core/src/main/java/org/apache/doris/persist/EditLog.java
index 87b2b746d5e..963a1e06c8a 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/persist/EditLog.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/persist/EditLog.java
@@ -1476,8 +1476,8 @@ public class EditLog {
         logEdit(OperationType.OP_EXPORT_CREATE, job);
     }
 
-    public void logExportUpdateState(long jobId, ExportJob.JobState newState) {
-        ExportJob.StateTransfer transfer = new ExportJob.StateTransfer(jobId, 
newState);
+    public void logExportUpdateState(ExportJob job, ExportJob.JobState 
newState) {
+        ExportJob.StateTransfer transfer = new ExportJob.StateTransfer(job, 
newState);
         logEdit(OperationType.OP_EXPORT_UPDATE_STATE, transfer);
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to