Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix](Export) fix dead lock of parallel Exporting #43097

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions fe/fe-core/src/main/java/org/apache/doris/load/ExportJob.java
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ public synchronized boolean updateState(ExportJob.JobState newState, boolean isR
}
// 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;
}
Expand Down Expand Up @@ -846,10 +846,9 @@ public StateTransfer() {
}

// 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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1476,8 +1476,8 @@ public void logExportCreate(ExportJob job) {
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);
}

Expand Down
Loading