Enforce worker capacity under the same lock as assignment
A least-loaded query is only a candidate hint; it cannot enforce a per-worker capacity limit under concurrency. Lock the selected worker row, recount every unreleased holding inside the assignment transaction, reject when the cap is reached, and retry another eligible worker. Existing sticky ownership may bypass new-admission capacity so lowering a limit drains naturally instead of evicting active work. The dashboard count must use the same unreleased-holding definition, or operators will see capacity that disagrees with routing. This pattern prevents overfill; it does not optimize for heterogeneous task cost.
Applies when: Multiple schedulers can assign distinct jobs to the same bounded worker concurrently. Keywords: worker capacity concurrency row lock recount assignment sticky drain dashboard