-
Notifications
You must be signed in to change notification settings - Fork 13.9k
[FLINK-12021] Deploy execution in topological sorted order #8060
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
Conversation
|
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. DetailsThe Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
zentol
left a comment
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.
one comment as to whether the ResultConjunctFuture constructor should only accept Lists, otherwise +1.
@flinkbot approve all
| } | ||
| else { | ||
| int counter = 0; | ||
| for (CompletableFuture<? extends T> future : resultFutures) { |
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.
Isn't it common to only accept a List if the order of elements is relevant?
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.
I would not restrict the user on the type of collection he wants to use. The contract is that the result collection will have the same order as the input collection.
| } | ||
|
|
||
| final Iterator<CompletableFuture<LogicalSlot>> slotIterator = slotFutures.iterator(); | ||
| final SlotProvider slotProvider = new TestingSlotProvider(slotRequestId -> { |
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.
This looks like a basic use-case that we could move into a reusable FixedSizeTestingSlotProvider extends TestingSlotProvider class with a Collection<CompletableFuture<LogicalSlot>> getSlotFutures() method.
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.
Good point. I will add this utility and refactor the test.
2d1178c to
61f40e4
Compare
shuai-xu
left a comment
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.
Cool, it is useful for us.
…shipCall Fix the race condition between executing EmbeddedLeaderService#GrantLeadershipCall and a concurrent shutdown of the leader service by making GrantLeadershipCall not accessing mutable state outside of a lock. This closes apache#7935.
Due to changes how the slot futures are completed and due to the fact that the ResultConjunctFuture does not maintain the order in which the futures were specified, it could happen that executions were not deployed in topological order. This commit fixes this problem by changing the ResultConjunctFuture so that it maintains the order of the specified futures in its result collection. This closes apache#8060.
61f40e4 to
afe607c
Compare
Due to changes how the slot futures are completed and due to the fact that the ResultConjunctFuture does not maintain the order in which the futures were specified, it could happen that executions were not deployed in topological order. This commit fixes this problem by changing the ResultConjunctFuture so that it maintains the order of the specified futures in its result collection. This closes apache#8060.
Due to changes how the slot futures are completed and due to the fact that the ResultConjunctFuture does not maintain the order in which the futures were specified, it could happen that executions were not deployed in topological order. This commit fixes this problem by changing the ResultConjunctFuture so that it maintains the order of the specified futures in its result collection. This closes apache#8060.
What is the purpose of the change
Due to changes how the slot futures are completed and due to the fact that the
ResultConjunctFuture does not maintain the order in which the futures were specified,
it could happen that executions were not deployed in topological order. This commit
fixes this problem by changing the ResultConjunctFuture so that it maintains the order
of the specified futures in its result collection.
This also fixes a performance regression when deploying tasks since deploying tasks in non-topological order can lead to additional result partition lookups.
Verifying this change
ExecutionGraphDeploymentTest#testExecutionGraphIsDeployedInTopologicalOrderandConjunctFutureTest#testConjunctFutureCompletion.Does this pull request potentially affect one of the following parts:
@Public(Evolving): (no)Documentation