zouhuajian opened a new pull request, #8709:
URL: https://github.com/apache/hadoop/pull/8709

   ### Description of PR
   
   This PR fixes [HDFS-17970](https://issues.apache.org/jira/browse/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:
   
   - [x] 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](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] 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:
   
   - [ ] The PR includes the phrase "Contains content generated by OpenAI 
Codex."
   - [ ] My use of AI contributions follows the ASF legal policy 
[https://www.apache.org/legal/generative-tooling.html](https://www.apache.org/legal/generative-tooling.html)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to