-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Make scheduling of remote accessible splits with addresses more strict #22190
Conversation
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/execution/scheduler/UniformNodeSelector.java
Show resolved
Hide resolved
bf5f078
to
445636a
Compare
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 commit message definitely needs improving. This is an important change, and it deserves a careful description.
...main/java/io/trino/execution/scheduler/faulttolerant/ArbitraryDistributionSplitAssigner.java
Show resolved
Hide resolved
...src/main/java/io/trino/execution/scheduler/faulttolerant/BinPackingNodeAllocatorService.java
Show resolved
Hide resolved
445636a
to
215e0dc
Compare
215e0dc
to
2c5c0e6
Compare
@@ -139,7 +139,7 @@ public AssignmentResult assign(PlanNodeId planNodeId, ListMultimap<Integer, Spli | |||
.orElse(ImmutableSet.of()); | |||
assignment.addPartition(new Partition( | |||
taskPartitionId, | |||
new NodeRequirements(catalogRequirement, hostRequirement))); | |||
new NodeRequirements(catalogRequirement, hostRequirement, true))); |
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.
@@ -83,7 +83,7 @@ public AssignmentResult finish() | |||
if (!partitionAdded) { | |||
partitionAdded = true; | |||
result | |||
.addPartition(new Partition(0, new NodeRequirements(Optional.empty(), hostRequirement))) | |||
.addPartition(new Partition(0, new NodeRequirements(Optional.empty(), hostRequirement, true))) |
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.
2c5c0e6
to
48841b2
Compare
UniformNodeSelector or FTE scheduler will schedule remote accessible splits on selected nodes if such nodes are available and only fallback to other nodes if preferred nodes are no longer part of cluster. Connector might have stale node information when creating splits which could result in choosing offline nodes. Additionally, in FTE mode nodes can go down so split addresses could no longer be valid then task is restarted. Additionally, this commit simplifies UniformNodeSelector optimizedLocalScheduling which was hard to reason about and was not taking advantages of recent improvements like adaptive split queue length. Co-authored-by: Karol Sobczak <[email protected]>
48841b2
to
8e8ca54
Compare
We don't really document that there are selected nodes as part of FTE... so I'm not sure how user-visible this change would be or if a release note is necessary? |
It's more for devs, so probably should be in SPI section |
Description
UniformNodeSelector or FTE scheduler will schedule remote accessible splits on selected nodes if such nodes are available and only fallback to other nodes is nodes are no longer part of cluster. Connector might have stalled node information while creating splits which could result in selecting nodes which are now offline. Additionally, in FTE mode nodes can go down so split addresses could no longer be valid then task is restarted.
Additionally, this commit simplifies UniformNodeSelector optimizedLocalScheduling which was hard to reason about and was not taking advantages of recent improvements like adaptive split queue length.
Extracted from: #21888
Additional context and related issues
Release notes
( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
(x) Release notes are required, with the following suggested text: