Skip to content

Commit

Permalink
[MINOR] scheduler micro opts
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?
Scheduler micro optimizations to speed up the scheduling loop.

### Why are the changes needed?
The scheduler is single threaded and the faster we can schedule the faster a query executes. Changes to the scheduler usually adversely affect scheduling throughput which makes it hard to prototype novel changes. Getting some headroom makes experimentation faster while not hurting production.

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Existing tests.

Closes apache#40464 from alkis/scheduler-micro-opts.

Authored-by: Alkis Evlogimenos <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
  • Loading branch information
alkis authored and HyukjinKwon committed Mar 20, 2023
1 parent 708bda3 commit 372b1cb
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions core/src/main/scala/org/apache/spark/scheduler/TaskInfo.scala
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,8 @@ class TaskInfo(
// finishTime should be set larger than 0, otherwise "finished" below will return false.
assert(time > 0)
finishTime = time
if (state == TaskState.FAILED) {
failed = true
} else if (state == TaskState.KILLED) {
killed = true
}
failed = state == TaskState.FAILED
killed = state == TaskState.KILLED
}

private[spark] def launchSucceeded(): Unit = {
Expand Down

0 comments on commit 372b1cb

Please sign in to comment.