Add thread-per-driver executor#18118
Merged
martint merged 7 commits intotrinodb:masterfrom Aug 15, 2023
Merged
Conversation
347e1a8 to
5796352
Compare
dain
reviewed
Jul 10, 2023
core/trino-main/src/main/java/io/trino/execution/executor/RunningSplitInfo.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/executor/RunningSplitInfo.java
Outdated
Show resolved
Hide resolved
230bb8f to
5eca4ff
Compare
55fc1ef to
831170a
Compare
martint
commented
Jul 13, 2023
core/trino-main/src/main/java/io/trino/execution/TaskManagerConfig.java
Outdated
Show resolved
Hide resolved
dain
approved these changes
Aug 11, 2023
Member
dain
left a comment
There was a problem hiding this comment.
Looks good. Given this is behind a flag, I have no concerns about merging this as is.
core/trino-main/src/main/java/io/trino/execution/executor2/scheduler/SchedulerContext.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/executor2/scheduler/SchedulerContext.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/executor2/ThreadPerDriverTaskExecutor.java
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/executor2/ThreadPerDriverTaskExecutor.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/TaskManagerConfig.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/executor2/scheduler/SchedulingQueue.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/executor2/scheduler/SchedulingQueue.java
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/executor2/scheduler/SchedulingQueue.java
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/executor2/scheduler/SchedulingQueue.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/executor2/scheduler/SchedulingQueue.java
Outdated
Show resolved
Hide resolved
The test mixed class-level state with method-level state and wasn't consistent with everything that was going on in that class.
These objects don't need lifecycle managed throughout the test, so they can be created where they are needed
701e910 to
438f3d0
Compare
438f3d0 to
16a2d06
Compare
In preparation for adding a ThreadPerSplitTaskExecutor
If there's an exception while the driver is being created, the error is not being propagated to the state machine. This can cause tasks to not be destroyed and blocked drivers to not be canceled.
* Uses a fair queue based on Completely Fair Scheduler * Runs each driver in a separate thread
16a2d06 to
82e2a6b
Compare
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements a new split executor that uses a dedicated thread per split. Concurrency is controlled by parking and unparking threads after each execution quantum while ensuring each thread gets its fair share of compute resources. Replaces the multi-level feedback queue with a simpler implementation inspired on Linux's CFS scheduling algorithm.
Some benefits of this approach:
Release notes
(x) This is not user-visible or docs only and no release notes are required.