Skip to content

Commit

Permalink
Improve task deploy state change
Browse files Browse the repository at this point in the history
  • Loading branch information
EricJoy2048 committed Sep 14, 2023
1 parent 7ed36ea commit 9fc2022
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,7 @@ protected void tryTriggerPendingCheckpoint(CheckpointType checkpointType) {

if (pendingCounter.get() > 0) {
scheduleTriggerPendingCheckpoint(checkpointType, 500L);
LOG.info(
"skip trigger checkpoint because there is already a pending checkpoint.");
LOG.info("skip trigger checkpoint because there is already a pending checkpoint.");
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,14 +320,9 @@ private TaskDeployState deployInternal(
Function<TaskGroupImmutableInformation, TaskDeployState> taskGroupConsumer) {
TaskGroupImmutableInformation taskGroupImmutableInformation =
getTaskGroupImmutableInformation();
synchronized (this) {
if (ExecutionState.DEPLOYING.equals(currExecutionState)) {
TaskDeployState state = taskGroupConsumer.apply(taskGroupImmutableInformation);
updateTaskState(ExecutionState.DEPLOYING, ExecutionState.RUNNING);
return state;
}
return TaskDeployState.success();
}
TaskDeployState state = taskGroupConsumer.apply(taskGroupImmutableInformation);
updateTaskState(ExecutionState.DEPLOYING, ExecutionState.RUNNING);
return state;
}

private TaskGroupImmutableInformation getTaskGroupImmutableInformation() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.apache.seatunnel.engine.server.TestUtils;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import com.hazelcast.internal.serialization.Data;
Expand Down

0 comments on commit 9fc2022

Please sign in to comment.