-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Add thread-per-driver executor #18118
Merged
Merged
Conversation
This file contains 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
martint
force-pushed
the
thread-per-split
branch
17 times, most recently
from
July 10, 2023 19:39
347e1a8
to
5796352
Compare
dain
reviewed
Jul 10, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first 5 commits look good
core/trino-main/src/main/java/io/trino/execution/executor/RunningSplitInfo.java
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/executor/RunningSplitInfo.java
Show resolved
Hide resolved
martint
force-pushed
the
thread-per-split
branch
9 times, most recently
from
July 13, 2023 02:10
230bb8f
to
5eca4ff
Compare
martint
force-pushed
the
thread-per-split
branch
3 times, most recently
from
July 13, 2023 21:51
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Outdated
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
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
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
martint
force-pushed
the
thread-per-split
branch
6 times, most recently
from
August 14, 2023 21:55
701e910
to
438f3d0
Compare
martint
force-pushed
the
thread-per-split
branch
from
August 15, 2023 01:14
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
martint
force-pushed
the
thread-per-split
branch
from
August 15, 2023 03:34
16a2d06
to
82e2a6b
Compare
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.