luoyuan3471 opened a new pull request, #8752: URL: https://github.com/apache/hadoop/pull/8752
### Description of PR Multi-node allocation can reserve a container on an earlier candidate, then overwrite the allocation result when a later node is skipped during the node precheck. When candidate traversal ends, the earlier reservation is discarded or may be completed against the wrong node. This change tracks the latest reservation together with the node that produced it, completes that reservation after later node-level skips, and returns successful allocations directly so they cannot fall back to a stale reservation. JIRA: https://issues.apache.org/jira/browse/YARN-11992 ### How was this patch tested? - Added focused regression coverage in `TestRegularContainerAllocator` for preserving an earlier reservation after a later candidate is skipped, completing the reservation on its original node, and avoiding fallback to a stale reservation when `doAllocation` does not allocate. - `TestRegularContainerAllocator`: 3 tests passed. - `TestCapacitySchedulerMultiNodes`: 7 tests passed; one test could not run locally because Mockito/Byte Buddy could not attach to the JDK 17 JVM. No assertion failure was observed. ### 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? Not applicable. - [x] 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)? No dependencies added. - [x] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, `NOTICE-binary` files? Not applicable. ### 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]
