Commit eaf7392
committed
fix(billing): release reserved slot on execute-route 503 and setup throw
After preprocessExecution reserves a billing concurrency slot, the streaming
path could exit without releasing it: the 503 return when
initializeExecutionStreamMeta fails, and any throw during stream setup (caught
by the outer handler, which only returned 500). Both left the slot held until
TTL, wrongly throttling unrelated runs. Release on the 503 path and in the
outer catch (executionId hoisted so the catch can see it; release is
idempotent and a no-op when no slot was reserved).1 parent 7927336 commit eaf7392
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
381 | 385 | | |
382 | 386 | | |
383 | 387 | | |
| |||
637 | 641 | | |
638 | 642 | | |
639 | 643 | | |
640 | | - | |
641 | | - | |
| 644 | + | |
642 | 645 | | |
643 | 646 | | |
644 | 647 | | |
| |||
1166 | 1169 | | |
1167 | 1170 | | |
1168 | 1171 | | |
| 1172 | + | |
1169 | 1173 | | |
1170 | 1174 | | |
1171 | 1175 | | |
| |||
1724 | 1728 | | |
1725 | 1729 | | |
1726 | 1730 | | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
1727 | 1734 | | |
1728 | 1735 | | |
1729 | 1736 | | |
| |||
0 commit comments