Skip to content

HDFS-17970. Exclude failed EC checksum target from reconstruction sources - #8709

Open
zouhuajian wants to merge 1 commit into
apache:trunkfrom
zouhuajian:fix/HDFS-17970-ec-checksum-reconstruction
Open

HDFS-17970. Exclude failed EC checksum target from reconstruction sources#8709
zouhuajian wants to merge 1 commit into
apache:trunkfrom
zouhuajian:fix/HDFS-17970-ec-checksum-reconstruction

Conversation

@zouhuajian

Copy link
Copy Markdown

Description of PR

This PR fixes HDFS-17970.

During striped block checksum reconstruction, the DataNode that failed the original checksum request could still be selected as a reconstruction source. This may cause reconstruction to read from the same failed target and prevent the file checksum from being calculated.

This change:

  • excludes every location belonging to the failed checksum target from the reconstruction source candidates;
  • keeps source block indices aligned with their corresponding DataNode locations during source selection;
  • preserves valid non-target replicas when selecting the required sources;
  • adds a deterministic regression test that triggers the checksum reconstruction fallback with an invalid child block token.

Contains content generated by OpenAI Codex.

How was this patch tested?

  • Ran the focused regression test: TestFileChecksum#testStripedFileChecksumReconstructionExcludesFailedTarget (2 tests passed).
  • Ran the complete TestFileChecksum test class (72 tests passed).
  • Ran git diff --check.

For code changes:

  • Does the title of this PR start 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? Note: Automated CI testing doesn't cover all cases so manual testing with cloud storage is still required.
  • 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?

The unchecked object storage, dependency, and license-file items are not applicable to this change.

AI Tooling

If an AI tool was used:

@hadoop-yetus

Copy link
Copy Markdown

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 19m 46s 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 47m 54s trunk passed
+1 💚 compile 1m 50s trunk passed with JDK Ubuntu-21.0.12+8-1-24.04-Ubuntu
+1 💚 compile 1m 49s trunk passed with JDK Ubuntu-17.0.20+8-1-24.04-Ubuntu
+1 💚 checkstyle 1m 50s trunk passed
+1 💚 mvnsite 1m 59s trunk passed
+1 💚 javadoc 1m 30s trunk passed with JDK Ubuntu-21.0.12+8-1-24.04-Ubuntu
+1 💚 javadoc 1m 30s trunk passed with JDK Ubuntu-17.0.20+8-1-24.04-Ubuntu
+1 💚 spotbugs 4m 23s trunk passed
+1 💚 shadedclient 42m 50s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 1m 24s the patch passed
+1 💚 compile 1m 17s the patch passed with JDK Ubuntu-21.0.12+8-1-24.04-Ubuntu
+1 💚 javac 1m 17s the patch passed
+1 💚 compile 1m 22s the patch passed with JDK Ubuntu-17.0.20+8-1-24.04-Ubuntu
+1 💚 javac 1m 22s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 1m 17s the patch passed
+1 💚 mvnsite 1m 32s the patch passed
+1 💚 javadoc 0m 59s the patch passed with JDK Ubuntu-21.0.12+8-1-24.04-Ubuntu
+1 💚 javadoc 1m 3s the patch passed with JDK Ubuntu-17.0.20+8-1-24.04-Ubuntu
+1 💚 spotbugs 4m 5s the patch passed
+1 💚 shadedclient 36m 36s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 264m 21s hadoop-hdfs in the patch passed.
-1 ❌ asflicense 0m 55s /results-asflicense.txt The patch generated 1 ASF License warnings.
438m 6s
Subsystem Report/Notes
Docker ClientAPI=1.55 ServerAPI=1.55 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8709/1/artifact/out/Dockerfile
GITHUB PR #8709
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux ae8fd63dc7b3 5.15.0-185-generic #195-Ubuntu SMP Fri Jun 19 17:11:50 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 2339461
Default Java Ubuntu-17.0.20+8-1-24.04-Ubuntu
Multi-JDK versions /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.12+8-1-24.04-Ubuntu /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.20+8-1-24.04-Ubuntu
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8709/1/testReport/
Max. process+thread count 2468 (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-8709/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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants