mwkang opened a new pull request, #8798:
URL: https://github.com/apache/storm/pull/8798

   ## What this PR does
   `DefaultScheduler.defaultSchedule` runs the idle-supervisor redistribute 
pass twice per
   scheduling round — once over the full topology set 
(`DefaultScheduler.java:75`), then again
   inside the per-leftover `EvenScheduler.scheduleTopologiesEvenly` call 
(`EvenScheduler.java:336`).
   So the per-topology `nimbus.even.rebalance.max.free.per.topology` cap is 
applied twice, and an
   under-assigned topology can relocate up to `2 × cap` workers in a single 
round.
   
   The fix adds a `redistributeOntoIdle` toggle to `scheduleTopologiesEvenly`:
   - the public 2-arg entry point keeps redistribute on, so using 
`EvenScheduler` directly is unchanged;
   - `DefaultScheduler` runs the single full-set redistribute itself and 
delegates per leftover
     topology with the toggle off.
   
   The cap now binds once per round, while the full-set round-robin fairness 
that lets multiple
   topologies share idle slots is preserved (simply dropping the full-set call 
would break it).
   
   Follow-up to #8778. The feature is off by default, so there is no behavior 
change unless
   `nimbus.even.rebalance.idle.supervisor.enabled=true`.
   
   Closes #8797.
   
   ## How it was tested
   Added `defaultSchedulerAppliesMaxFreeCapOncePerRound`: the DefaultScheduler 
path with two idle
   supervisors, `max.free.per.topology=1`, and an under-assigned topology — it 
relocates two workers
   before the fix and exactly one after. Existing 
`TestEvenSchedulerIdleSupervisor` and the other
   scheduler tests still pass.
   


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

Reply via email to