luoyuan3471 opened a new pull request, #8904: URL: https://github.com/apache/hadoop/pull/8904
## Problem - `FifoCandidatesSelector.preemptFrom()` ignores the result of `tryPreemptContainerAndDeductResToObtain()` when processing reserved containers. - Outside observe-only mode, it sends `KILL_RESERVED_CONTAINER` even when the helper rejects the reservation. For example, preemption in the default partition can cancel a reservation in another partition that does not need preemption. ## Solution - Send `KILL_RESERVED_CONTAINER` only when the reservation is selected and observe-only mode is disabled. - Add regression tests for unselected reservations, selected reservations, and observe-only mode. - Leave preemption resource calculations and reservation commit handling unchanged. ## Validation - Local environment: macOS, JDK 17.0.8, Maven Wrapper 3.9.15; no native profile. - On unpatched trunk, `testUnselectedReservedContainerIsNotCancelled` fails because an unexpected `KILL_RESERVED_CONTAINER` event is dispatched. It passes with this fix. - `TestProportionalCapacityPreemptionPolicyForReservedContainers`: 10 tests passed. - `TestProportionalCapacityPreemptionPolicyForNodePartitions`: 11 tests passed. - `TestProportionalCapacityPreemptionPolicyInterQueueWithDRF`: 4 tests passed. - `TestProportionalCapacityPreemptionPolicy`: 33 tests passed. - Total: 58 tests, 0 failures, 0 errors, 0 skipped. - `git diff --check` passed. ## Related Jira [YARN-12053](https://issues.apache.org/jira/browse/YARN-12053) Contains content generated by Codex. -- 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]
