Skip to content

HDFS-17927. Make TestDiskError.testShutdown use deterministic volume failure injection#8517

Draft
smengcl wants to merge 1 commit into
apache:trunkfrom
smengcl:HDFS-17927-test
Draft

HDFS-17927. Make TestDiskError.testShutdown use deterministic volume failure injection#8517
smengcl wants to merge 1 commit into
apache:trunkfrom
smengcl:HDFS-17927-test

Conversation

@smengcl
Copy link
Copy Markdown
Contributor

@smengcl smengcl commented May 27, 2026

Description of PR

TestDiskError.testShutdown() currently drives DataNode shutdown by repeatedly creating files until dn.isDatanodeUp() becomes false. If shutdown does not happen promptly, the test can loop for a long time and generate excessive logs.

This change replaces the file-create loop with deterministic failure injection for both DataNode data dirs, then explicitly runs dn.checkDiskError() and waits boundedly for the DataNode to exit.

How was this patch tested?

  • The test TestDiskError.testShutdown itself.

For code changes:

  • Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

AI Tooling

If an AI tool was used:

@smengcl smengcl requested a review from adoroszlai May 27, 2026 02:43
@smengcl smengcl added the test test code changes label May 27, 2026
@hadoop-yetus
Copy link
Copy Markdown

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 6m 35s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 27m 1s trunk passed
+1 💚 compile 0m 59s trunk passed with JDK Ubuntu-21.0.10+7-Ubuntu-124.04
+1 💚 compile 1m 1s trunk passed with JDK Ubuntu-17.0.18+8-Ubuntu-124.04.1
+1 💚 checkstyle 0m 59s trunk passed
+1 💚 mvnsite 1m 10s trunk passed
+1 💚 javadoc 0m 58s trunk passed with JDK Ubuntu-21.0.10+7-Ubuntu-124.04
+1 💚 javadoc 0m 56s trunk passed with JDK Ubuntu-17.0.18+8-Ubuntu-124.04.1
+1 💚 spotbugs 2m 12s trunk passed
+1 💚 shadedclient 17m 15s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 46s the patch passed
+1 💚 compile 0m 39s the patch passed with JDK Ubuntu-21.0.10+7-Ubuntu-124.04
+1 💚 javac 0m 39s the patch passed
+1 💚 compile 0m 44s the patch passed with JDK Ubuntu-17.0.18+8-Ubuntu-124.04.1
+1 💚 javac 0m 44s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 0m 41s /results-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt hadoop-hdfs-project/hadoop-hdfs: The patch generated 1 new + 2 unchanged - 1 fixed = 3 total (was 3)
+1 💚 mvnsite 0m 46s the patch passed
+1 💚 javadoc 0m 34s the patch passed with JDK Ubuntu-21.0.10+7-Ubuntu-124.04
+1 💚 javadoc 0m 36s the patch passed with JDK Ubuntu-17.0.18+8-Ubuntu-124.04.1
+1 💚 spotbugs 2m 1s the patch passed
+1 💚 shadedclient 16m 52s patch has no errors when building and testing our client artifacts.
_ Other Tests _
-1 ❌ unit 185m 8s /patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt hadoop-hdfs in the patch passed.
+1 💚 asflicense 0m 30s The patch does not generate ASF License warnings.
267m 59s
Reason Tests
Failed junit tests hadoop.hdfs.server.balancer.TestBalancerWithHANameNodes
Subsystem Report/Notes
Docker ClientAPI=1.54 ServerAPI=1.54 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8517/1/artifact/out/Dockerfile
GITHUB PR #8517
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 13ab2fe8bf49 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / d6f2f1e
Default Java Ubuntu-17.0.18+8-Ubuntu-124.04.1
Multi-JDK versions /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.10+7-Ubuntu-124.04 /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.18+8-Ubuntu-124.04.1
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8517/1/testReport/
Max. process+thread count 4370 (vs. ulimit of 10000)
modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8517/1/console
versions git=2.43.0 maven=3.9.15 spotbugs=4.9.7
Powered by Apache Yetus 0.14.1 https://yetus.apache.org

This message was automatically generated.

@adoroszlai adoroszlai requested a review from boky01 May 27, 2026 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

HDFS test test code changes trunk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants