TEZ-4725: Fix flaky tests in TestAMRecoveryAggregationBroadcast#520
Open
maheshrajus wants to merge 1 commit into
Open
TEZ-4725: Fix flaky tests in TestAMRecoveryAggregationBroadcast#520maheshrajus wants to merge 1 commit into
maheshrajus wants to merge 1 commit into
Conversation
|
🎊 +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