Skip to content

Commit

Permalink
nit: remove synchornized
Browse files Browse the repository at this point in the history
  • Loading branch information
turboFei committed Dec 20, 2024
1 parent 4ae7cee commit 6d1b4ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ protected static List<TaskInfo> getTaskAttempts(TaskSetManager taskSetManager, l
}
}

public static synchronized boolean taskAnotherAttemptRunningOrSuccessful(long taskId) {
public static boolean taskAnotherAttemptRunningOrSuccessful(long taskId) {
TaskSetManager taskSetManager = getTaskSetManager(taskId);
if (taskSetManager != null) {
int stageId = taskSetManager.stageId();
Expand All @@ -272,7 +272,7 @@ public static synchronized boolean taskAnotherAttemptRunningOrSuccessful(long ta
if (ti.taskId() != taskId) {
if (ti.successful()) {
LOG.info(
"StageId={} index={} taskId={} attempt={} another attempt {} is finished.",
"StageId={} index={} taskId={} attempt={} another attempt {} is successful.",
stageId,
taskIndex,
taskId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ protected static List<TaskInfo> getTaskAttempts(TaskSetManager taskSetManager, l
}
}

public static synchronized boolean taskAnotherAttemptRunningOrSuccessful(long taskId) {
public static boolean taskAnotherAttemptRunningOrSuccessful(long taskId) {
TaskSetManager taskSetManager = getTaskSetManager(taskId);
if (taskSetManager != null) {
int stageId = taskSetManager.stageId();
Expand All @@ -388,7 +388,7 @@ public static synchronized boolean taskAnotherAttemptRunningOrSuccessful(long ta
if (ti.taskId() != taskId) {
if (ti.successful()) {
LOG.info(
"StageId={} index={} taskId={} attempt={} another attempt {} is finished.",
"StageId={} index={} taskId={} attempt={} another attempt {} is successful.",
stageId,
taskIndex,
taskId,
Expand Down

0 comments on commit 6d1b4ad

Please sign in to comment.