The session cap: three gaps left after braid#502 and braid#509 #535
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What happens
Braid holds agent steps to the sessions a backend serves (braid#498) and a step's helpers to its places (braid#502, braid#509). Three cases still pass it:
None has been seen to cost anything yet.
Fix
Count a step's live background helpers in the scheduler's in-flight number, and keep the ceiling per backend, not per server.
Done when
A test shows no more sessions at work than the backend serves in each of the three cases.
All three gaps are closed. The ceiling is read per run, from the backend that run was started on. Agent steps and the places granted to their helpers are counted together. A helper started in the background asks osfd for a place (
POST /api/runs/{run}/helper-place) and gives it back when it ends, and a helper its step waits for works in the step's place. If osfd does not answer within 2 s, the guard falls back to its old gate.Evidence: a scheduler test where a helper in the background holds the next agent step and a second helper is refused, a per-run ceiling test, a route test, and a node test of the guard against a fake osfd. The helper sims pass.
Shipped in pull request 550 (merge
3bed64d), changeconsole-fixes-and-session-cap, archived in pull request 551.