huangxiaopingRD opened a new pull request, #60383:
URL: https://github.com/apache/spark/pull/60383

   ### What changes were proposed in this pull request?
   
   Maintain a host-to-executors index for each executor resource profile and 
reuse the compatible profile's index for both complete-exclusion detection and 
idle executor replacement.
   
   Keep support for task-only resource profiles reusing default-profile 
executors when dynamic allocation is disabled, using the existing 
`ResourceProfileManager.canBeScheduled` rule.
   
   This revisits #43366 and incorporates its review feedback: maintain the 
grouped host maps directly rather than reconstructing them in each unsuccessful 
scheduling round, without adding an executor-to-profile reverse index.
   
   ### Why are the changes needed?
   
   When all compatible executors are excluded for a pending task, an unexcluded 
executor from another resource profile can cause complete-exclusion detection 
to return `None`. The task then misses the existing recovery and abort-timeout 
paths and can remain pending indefinitely.
   
   The idle replacement search must use the same compatible candidates; 
replacing an executor belonging to another profile does not provide resources 
for the blocked TaskSet.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Tasks excluded from all compatible executors can enter the existing 
executor replacement and timeout handling even when incompatible executors 
remain registered.
   
   ### How was this patch tested?
   
   Added two mixed-profile regression cases covering default and custom task 
profiles, plus a task-only profile compatibility case. The mixed-profile cases 
fail against the unmodified implementation.
   
   With JDK 21, all 223 tests in the following four suites passed. Both main 
and test scalastyle checks passed with zero errors and warnings.
   
   ```sh
   build/sbt \
     "core/testOnly *TaskSchedulerImplSuite *TaskSetManagerSuite 
*TaskSetExcludelistSuite *ResourceProfileManagerSuite" \
     "core/scalastyle" \
     "core/Test/scalastyle"
   ```
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: OpenAI Codex (GPT-6)
   


-- 
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]

Reply via email to