-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Improve sheduling of min drivers per task #10249
Improve sheduling of min drivers per task #10249
Conversation
cc @dain |
core/trino-main/src/main/java/io/trino/execution/executor/TaskExecutor.java
Outdated
Show resolved
Hide resolved
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.
Code LGTM (for what I can tell :) )
Maybe make it more explicit in commit message that it is about target concurrency which is changed while execution. Maybe sht like:
Start more than a single split in TaskExecutor#scheduleTaskIfNecessary.
Previously only a single split was started. This caused
that less than task.min-drivers-per-task splits were
running for situations when targetConcurrency was increased in SplitConcurrencyController.
You mention buffer
. What buffery you have in mind?
core/trino-main/src/test/java/io/trino/execution/executor/TestTaskExecutor.java
Outdated
Show resolved
Hide resolved
baff049
to
e37eb1e
Compare
It's task output buffer. |
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 change looks good to me. The description is a little confusing though.
My understanding is that this method is called when a split is added or when a split is finished. I guess the assumption was that it will always schedule a split if one exist. With this assumption the implementation would behave correctly.
However due to the adaptive concurrency implementation details the pollNextSplit
method may not always return a split even if one exist, so the assumption breaks. Thus it is required to schedule as many splits as needed in one shot.
If worker gets N splits, but |
Start more than a single split in TaskExecutor#scheduleTaskIfNecessary. Previously only a single split was started. This caused that less than task.min-drivers-per-task splits were running for situations when targetConcurrency was increased in SplitConcurrencyController.
e37eb1e
to
ce4dc86
Compare
Start more than single split in TaskExecutor#scheduleTaskIfNecessary.
Previously only single split was started. This caused
that less than task.min-drivers-per-task splits were
running for situations when buffer was underutlized
and no more splits were scheduled by coordinator.