TEZ-4725: Fix flaky tests in TestAMRecoveryAggregationBroadcast - #520
Merged
Conversation
|
🎊 +1 overall
This message was automatically generated. |
abstractdog
requested changes
Jul 22, 2026
maheshrajus
force-pushed
the
TEZ-4725_flaky
branch
from
July 28, 2026 10:18
37f881e to
9cedc91
Compare
Contributor
Author
|
@abstractdog I have addressed your review comments. Could you please review and approve the PR at your convenience? Thanks ! |
|
🎊 +1 overall
This message was automatically generated. |
abstractdog
reviewed
Jul 29, 2026
abstractdog
requested changes
Jul 29, 2026
abstractdog
left a comment
Contributor
There was a problem hiding this comment.
thanks @maheshrajus , only a few minor comments left
abstractdog
requested changes
Jul 29, 2026
abstractdog
left a comment
Contributor
There was a problem hiding this comment.
1 more thing, otherwise it's okay
abstractdog
approved these changes
Jul 29, 2026
|
🎊 +1 overall
This message was automatically generated. |
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.
Root causes and fixes:
TestAMRecoveryAggregationBroadcast.testMapJoinTemporalFailure (race condition)
Replace fixed Thread.sleep(10s) before AM kill with a deterministic
waitForVertexSucceeded() helper that polls DAGClient.getVertexStatus()
every 500ms (up to 60s) until the target vertices reach SUCCEEDED state.
Each test now waits for only the vertices it logically depends on before
killing the AM, ensuring the recovery log assertions always see the
expected counts.
Make OUT_PATH unique per test run (random suffix) to eliminate cross-test.
DAGClientRPCImpl / TezClientUtils: port out of range:-1 (YARN-808 gap)
YARN sets rpcPort=-1 when an AM container is allocated (state=RUNNING)
but the AM has not yet bound its RPC listener. The existing guard only
checked rpcPort==0 (protobuf default), so rpcPort==-1 reached
NetUtils.createSocketAddrForHost(), which threw
IllegalArgumentException: port out of range:-1.
Fix DAGClientRPCImpl.createAMProxyIfNeeded(): rpcPort == 0 → rpcPort <= 0.
Fix TezClientUtils.getAMProxy(FrameworkClient,...): add the same
rpcPort <= 0 guard