arhxam opened a new pull request, #8660: URL: https://github.com/apache/hadoop/pull/8660
### Description of PR Fixes [HADOOP-19387](https://issues.apache.org/jira/browse/HADOOP-19387). `LocalDirAllocator` currently records a directory configuration as initialized even when every configured directory fails initialization. An interruption can therefore leave an empty directory context cached indefinitely: later calls see the unchanged configuration and never retry. This patch records `savedLocalDirs` only after at least one directory is successfully initialized. A subsequent call can then retry a transiently failed initialization. The regression test uses a one-shot `DiskValidator` failure to exercise the same empty-context path deterministically, without relying on process timing. This supersedes the stale, closed attempt in #7298 and updates the regression coverage to the current JUnit 5 test suite. ### How was this patch tested? On macOS with OpenJDK 17.0.20 and Maven Wrapper 3.9.15: ```text ./mvnw -pl hadoop-common-project/hadoop-common -am -DskipShade \ -Dtest=TestLocalDirAllocator \ -Dsurefire.failIfNoSpecifiedTests=false test Tests run: 49, Failures: 0, Errors: 0, Skipped: 0 BUILD SUCCESS ``` Before the production change, the new test fails on the second allocation with `DiskErrorException`, confirming the regression. ### For code changes: - [x] Does the title of this PR start with the corresponding JIRA issue id? - [ ] Object storage: N/A - [ ] If adding new dependencies: no new dependencies - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, `NOTICE-binary` files? N/A ### AI Tooling Contains content generated by Codex. - [x] The PR includes the phrase "Contains content generated by Codex" - [x] My use of AI contributions follows the ASF legal policy 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]
