[FLINK-39914][runtime] Fix flaky TaskDeploymentDescriptorFactoryTest#testHybridVertexFinish caused by async TDD creation#28398
Open
och5351 wants to merge 1 commit into
Open
Conversation
…testHybridVertexFinish caused by async TDD creation
RocMarshal
approved these changes
Jun 11, 2026
RocMarshal
left a comment
Contributor
There was a problem hiding this comment.
Thanks @och5351 LGTM +1.
Collaborator
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.
What is the purpose of the change
Execution.deploy() now creates TaskDeploymentDescriptor asynchronously, which means the IO executor thread calls jobMasterMainThreadExecutor.execute() to hand off the work.
The problem is that forMainThread() captures the calling thread at the time of its creation and asserts inside execute() that only that same thread can call it.
Since the IO executor thread calls execute() instead, the assertion fires and throws an AssertionError. This error then bubbles up through the CompletableFuture chain, flipping the producer vertex into FAILED state, which causes an IllegalStateException when the consumer vertex tries to read from it.
Brief change log
Updated buildExecutionGraph() in TaskDeploymentDescriptorFactoryTest to replace forMainThread() with forSingleThreadExecutor() and add proper async handling to accommodate the asynchronous TaskDeploymentDescriptor creation in Execution.deploy().
Verifying this change
Does this pull request potentially affect one of the following parts:
@Public(Evolving): (yes / no)Documentation
Was generative AI tooling used to co-author this PR?