[BP-2.2][FLINK-39387][FLINK-39914][FLINK-39922][FLINK-39921][FLINK-39929][tests] Fix flaky scheduler tests under async TDD creation#28641
Open
MartijnVisser wants to merge 5 commits into
Conversation
…ead assertion failure in async TDD creation (cherry picked from commit 106acbc)
…testHybridVertexFinish caused by async TDD creation (apache#28398) (cherry picked from commit 6d47db1)
…ableStreamOperatorTest#testCheckpointDrain (apache#28425) (cherry picked from commit 6d106cd)
…ancelTest.testSendCancelAndReceiveFail (apache#28449) (cherry picked from commit a8d6a28)
…edSlowTaskDetectorTest due to unexepected ComponentMainThreadExecutor setting. (apache#28434) Co-authored-by: Yuepeng Pan <hipanyuepeng@gmail.com> (cherry picked from commit 67eba45)
Collaborator
Contributor
|
A little abmiguity: The PR title mentions only 2 items while it is cherrypicking 5. The packport to 2.3 contained 2 only. |
Contributor
Author
Good call, I'll fix this |
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
Backport of the async-TDD
ComponentMainThreadExecutortest-stability fix family from master to release-2.2. This PR intentionally bundles five JIRAs because they form one coherent cluster with an internal dependency (the FLINK-39387 pick introducesNoMainThreadCheckComponentMainThreadExecutor, which the later picks need to compile); each is a separate clean-xcherry-pick, so individual reverts remain possible.Observed on release-2.2 nightlies:
ExecutionVertexCancelTest.testSendCancelAndReceiveFailandExecutionTimeBasedSlowTaskDetectorTest.testFinishedTaskNotExceedRatiofail withIllegalStateException: BUG: trying to schedule a region which is not in CREATED stateatstartScheduling(build 76677,test_cron_jdk21 coreandtest_cron_azure corelegs).Root cause (same as on master): since FLINK-38114, TaskDeploymentDescriptor creation is offloaded to the I/O executor and deploy continuations complete on background threads. The
ComponentMainThreadExecutorServiceAdapter.forMainThread()test executor asserts the caller is the test main thread, so these completions trip the assertion. FLINK-38114 is on release-2.2, so the assertion relaxation applied by the master fixes is equally justified here. Test-only change; the production scheduler is not affected. The same fixes are already on release-2.3 (partly inherited, partly via the parallel backport PR).Brief change log
Clean
git cherry-pick -xof the merged master fixes, in dependency order (byte-identical, original authorship preserved):NoMainThreadCheckComponentMainThreadExecutor(absent on release-2.2).TaskDeploymentDescriptorFactoryTest#testHybridVertexFinish.AbstractAsyncRunnableStreamOperatorTest#testCheckpointDrain.ExecutionVertexCancelTest.testSendCancelAndReceiveFail.ExecutionTimeBasedSlowTaskDetectorTest.Verifying this change
This change is already covered by existing tests:
ExecutionVertexCancelTest+ExecutionTimeBasedSlowTaskDetectorTest: 4 runs, 20/20 green each run.TaskDeploymentDescriptorFactoryTest+AbstractAsyncRunnableStreamOperatorTest: green (36/36 combined run).flink-runtimetest-compile verified at every individual commit boundary.Does this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Claude Fable 5)