HDFS-17885. Fix TestDFSAdmin.testAllDatanodesReconfig flaky test.#8269
Closed
slfan1989 wants to merge 1 commit intoapache:trunkfrom
Closed
HDFS-17885. Fix TestDFSAdmin.testAllDatanodesReconfig flaky test.#8269slfan1989 wants to merge 1 commit intoapache:trunkfrom
slfan1989 wants to merge 1 commit intoapache:trunkfrom
Conversation
|
🎊 +1 overall
This message was automatically generated. |
Contributor
|
I merged this to trunk. Thank you @slfan1989 . |
eciuca
pushed a commit
to eciuca/hadoop
that referenced
this pull request
Feb 26, 2026
Closes apache#8269 Signed-off-by: Chris Nauroth <cnauroth@apache.org>
3 tasks
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.
Description of PR
JIRA: HDFS-17885. Fix TestDFSAdmin.testAllDatanodesReconfig flaky test.
Problem
TestDFSAdmin.testAllDatanodesReconfigtest fails with the following error:Root Cause
The test has a "self-conflicting" issue where it starts the reconfiguration task twice on the same DataNodes:
admin.startReconfiguration("datanode", "livenodes")- Successfully starts reconfiguration on 2 DataNodesreconfigurationOutErrFormatter("startReconfiguration", ...)- Internally callsadmin.startReconfigurationUtil(...)againThe problem is that DataNode's
startReconfigurationTask()does not allow concurrent reconfiguration. If a reconfiguration task is already running, it throwsIOExceptionwith messageAnother reconfiguration task is running.Therefore, the second invocation fails on both DataNodes, resulting in output containing only the summary line:
This causes the assertion
assertThat(outsForStartReconf).hasSize(3)to fail because:Solution
Remove the duplicate invocation by:
admin.startReconfigurationUtil()only onceAdditionally, improve the test robustness by:
NUM_DATANODESconstant instead of hardcoded valuesThread.sleep(1000)beforeawaitReconfigurationFinished()How was this patch tested?
For code changes:
LICENSE,LICENSE-binary,NOTICE-binaryfiles?AI Tooling
If an AI tool was used:
where is the name of the AI tool used.
https://www.apache.org/legal/generative-tooling.html