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

   ## Problem
   
   - `RMNodeLabelsManager.updateResourceMappings()` dispatches a 
`NodeLabelsUpdateSchedulerEvent` even when its node-to-label map is empty. This 
occurs when configuring labels for inactive nodes, deactivating nodes, and 
during the deactivate step of a node resource update.
   - CapacityScheduler still acquires its write lock and updates queue 
resources for these events, although there are no node label mappings to apply. 
Node removal and resource update handling already update queue resources 
through their own scheduler paths.
   
   ## Solution
   
   - Skip dispatching the event when the node-to-label map is empty, after 
completing label and queue resource accounting.
   - Preserve non-empty maps whose values are empty label sets: clearing labels 
on a running node must still notify the scheduler.
   - Add a lifecycle regression test covering inactive label configuration, 
activation, resource updates, label removal, and deactivation, including event 
counts and partition resources.
   
   ## Validation
   
   - Local: Oracle JDK 17.0.8, Maven Wrapper 3.9.15 on macOS; pure Java tests 
without the native profile, with `-Dmaven.test.failure.ignore=false`.
   - Before the fix, the new test failed as expected: 1 test, 1 failure, 0 
errors, 0 skipped; an inactive node emitted 1 event instead of 0.
   - After the fix: `TestRMNodeLabelsManager` (13 tests), 
`TestCapacitySchedulerNodeLabelUpdate` (8 tests), and 
`TestNodeLabelContainerAllocation` (25 tests) passed: 46 tests in total, 0 
failures, 0 errors, 0 skipped across the successful runs.
   - An earlier combined run encountered a shared temporary-directory collision 
with another local test run. The affected classes passed when rerun serially 
with an isolated temporary directory.
   - `git diff --check origin/trunk...YARN-12055` passed. Community CI has not 
run yet.
   
   ## Related Jira
   
   - [YARN-12055](https://issues.apache.org/jira/browse/YARN-12055)
   
   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]

  • [PR] YARN-12055. Skip empty nod... luoyuan3471 (via GitHub) via common-issues

Reply via email to