Avoid blocking on a split source in fault tolerant task scheduling#12311
Merged
losipiuk merged 2 commits intotrinodb:masterfrom May 21, 2022
Merged
Avoid blocking on a split source in fault tolerant task scheduling#12311losipiuk merged 2 commits intotrinodb:masterfrom
losipiuk merged 2 commits intotrinodb:masterfrom
Conversation
arhimondr
reviewed
May 10, 2022
core/trino-main/src/main/java/io/trino/execution/scheduler/FaultTolerantStageScheduler.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/StageTaskSourceFactory.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/StageTaskSourceFactory.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/StageTaskSourceFactory.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/StageTaskSourceFactory.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/StageTaskSourceFactory.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/StageTaskSourceFactory.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/StageTaskSourceFactory.java
Outdated
Show resolved
Hide resolved
aab8054 to
4ebddbd
Compare
arhimondr
reviewed
May 10, 2022
core/trino-main/src/main/java/io/trino/execution/scheduler/StageTaskSourceFactory.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/StageTaskSourceFactory.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/StageTaskSourceFactory.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/StageTaskSourceFactory.java
Outdated
Show resolved
Hide resolved
050fa2b to
79a2ae9
Compare
arhimondr
reviewed
May 13, 2022
core/trino-main/src/main/java/io/trino/execution/scheduler/StageTaskSourceFactory.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/StageTaskSourceFactory.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/StageTaskSourceFactory.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/StageTaskSourceFactory.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/StageTaskSourceFactory.java
Outdated
Show resolved
Hide resolved
79a2ae9 to
015a87f
Compare
arhimondr
reviewed
May 16, 2022
core/trino-main/src/main/java/io/trino/execution/scheduler/StageTaskSourceFactory.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/StageTaskSourceFactory.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/StageTaskSourceFactory.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/StageTaskSourceFactory.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/StageTaskSourceFactory.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/StageTaskSourceFactory.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/StageTaskSourceFactory.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/StageTaskSourceFactory.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/SqlQueryScheduler.java
Outdated
Show resolved
Hide resolved
015a87f to
f8a141a
Compare
arhimondr
approved these changes
May 16, 2022
core/trino-main/src/main/java/io/trino/execution/scheduler/StageTaskSourceFactory.java
Outdated
Show resolved
Hide resolved
f8a141a to
2b93e48
Compare
arhimondr
reviewed
May 16, 2022
Contributor
arhimondr
left a comment
There was a problem hiding this comment.
The implementation looks good to me.
I think we should probably improve our test cases (Sorry for such a late afterthought, I should've thought about it earlier and comment).
When the components (TaskSource / FaultTolerantScheduler) were simply waiting for futures to resolve there wasn't any difference between a synchronous and asynchronous SplitSource, but now there is. Thus I wonder if it makes sense to add additional test cases that verify correctness when the futures returned (by either a TaskSource or a SplitSource) are no immediately "done").
core/trino-main/src/main/java/io/trino/execution/scheduler/StageTaskSourceFactory.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/test/java/io/trino/execution/scheduler/TestStageTaskSourceFactory.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/test/java/io/trino/execution/scheduler/TestingTaskSourceFactory.java
Outdated
Show resolved
Hide resolved
ab0afdd to
c433caf
Compare
arhimondr
approved these changes
May 18, 2022
losipiuk
approved these changes
May 20, 2022
core/trino-main/src/main/java/io/trino/execution/scheduler/StageTaskSourceFactory.java
Outdated
Show resolved
Hide resolved
It's possible for the probe side table scan of a join to block producing splits until the build side collects dynamic filters. In such a scenario, we need to avoid waiting on the blocked splits synchronously and allow other stages to schedule.
c433caf to
99f8006
Compare
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.
It's possible for the probe side table scan of a join to block
producing splits until the build side collects dynamic filters.
In such a scenario, we need to avoid waiting on the blocked splits
synchronously and allow other stages to schedule.
Description
fix
core query engine
Related issues, pull requests, and links
Documentation
( x) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.
Release notes
( x) No release notes entries required.
( ) Release notes entries required with the following suggested text: