Yuan Luo created YARN-12053:
-------------------------------

             Summary: Avoid cancelling unselected reserved containers during 
preemption
                 Key: YARN-12053
                 URL: https://issues.apache.org/jira/browse/YARN-12053
             Project: Hadoop YARN
          Issue Type: Bug
          Components: resourcemanager
            Reporter: Yuan Luo


h2. 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.

h2. 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.

h2. 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.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

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

Reply via email to