SEZ9 commented on issue #12121:
URL: https://github.com/apache/seatunnel/issues/12121#issuecomment-5674237064

   Thanks @CryoThrust for laying out the three-budget contract, and 
@Vivek1106-04 for turning it into a PR.
   
   The scope of the first PR looks like the right boundary: wiring the 
admission decision into `TaskCallTimer` and `RunBusWorkSupplier` rather than 
shipping a detached policy object, since the denial path (tracker stays put, 
bounded backoff, `BUDGET_EXHAUSTED` in the log, replacement worker still 
started when the denied worker is the last one serving the shared queue) is 
exactly what needs review. Releasing budget when the promoted worker finishes 
rather than on a timer fire also matches what was proposed here.
   
   A few concrete asks before I treat the implementation as ready for review:
   
   1. Keep both limits opt-in with default `0` / unlimited. A finite default 
would change behavior for existing deployments without an established capacity 
contract, so please don't introduce one in this first fix.
   2. Once CI on the PR is green, please confirm that here; I'll hold off on a 
detailed pass until then.
   3. The tests should deterministically prove these invariants:
      - a denied promotion does not create an extra worker, yet a queue whose 
last serving worker was denied still reaches readiness and completion;
      - global and per-job reservations are released on normal yield, on 
failure, and on cancellation, so another job can progress afterwards (the 
per-job rollback and release/reuse cases you mention cover part of this — 
please add the failure and cancellation paths if they're not there yet);
      - leaving both limits at `0` preserves the existing unbounded path.
   4. Keep the thread-pool status log fields (`sharedCooperativeWorkers`, 
`promotedCooperativeWorkers`, `totalCooperativePromotions`, 
`deniedCooperativePromotions`) as diagnostic evidence only; a broader metrics 
contract can be a separate follow-up once the policy is accepted.
   
   <!-- streview-comment:1064 -->


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