starknet_transaction_prover: track saturation and queue depth on the request path - #15027
starknet_transaction_prover: track saturation and queue depth on the request path#15027avi-starkware wants to merge 1 commit into
Conversation
9efc43a to
d3fe724
Compare
b63ea03 to
1d3075e
Compare
PR SummaryMedium Risk Overview Busy-rejects (queue full vs queue wait timeout) now share Observability: Reviewed by Cursor Bugbot for commit f6e04fe. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1d3075e. Configure here.
| // worker slot before `_saturation_clear_guard` clears the window. The reverse order would | ||
| // let a rejection open a new window between the clear and the release, with nothing left | ||
| // to clear it. | ||
| let (_saturation_clear_guard, _permit) = self.acquire_worker_slot().await?; |
There was a problem hiding this comment.
Saturation latch on admission drop order
Medium Severity
_admission is declared before the clear guard, so it drops after mark_progress. A concurrent queue-full reject can reopen the saturation window in that gap with no SaturationClearGuard left to clear it. With max_queued_requests = 0 and max_concurrent_requests = 1, admission stays full until that late drop, so the window can latch open once load-balancer traffic drains — the failure mode this binding order was meant to prevent.
Reviewed by Cursor Bugbot for commit 1d3075e. Configure here.
d3fe724 to
e1815f6
Compare
9496ef5 to
6775092
Compare
57ee518 to
4523a54
Compare
1d0384a to
738780b
Compare
4523a54 to
7040fc6
Compare
738780b to
22df80d
Compare
7040fc6 to
40c5031
Compare
…request path Adds the state `/health` will read in the next PR: a `SaturationMonitor` that opens a window on the first busy-reject and closes it on any forward progress -- a request acquiring a worker slot, or a slot being released. Slot release has to count, because once 503 pulls the load balancer's traffic away, a clear that waited for a new request would latch 503 forever; a drop guard covers the success, error and client-disconnect exits alike. Both busy-reject arms go through `record_busy_reject`, which counts the outcome, opens the window, warns and returns -32005 together, so a reject cannot count without latching. Also exposes queue depth and queue-wait duration, bucketed at the wait timeout. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
22df80d to
f6e04fe
Compare
40c5031 to
d686f96
Compare



Adds the state
/healthwill read in the next PR: aSaturationMonitorthatopens a window on the first busy-reject and closes it on any forward progress --
a request acquiring a worker slot, or a slot being released. Slot release has to
count, because once 503 pulls the load balancer's traffic away, a clear that
waited for a new request would latch 503 forever; a drop guard covers the
success, error and client-disconnect exits alike.
Both busy-reject arms go through
record_busy_reject, which counts the outcome,opens the window, warns and returns -32005 together, so a reject cannot count
without latching. Also exposes queue depth and queue-wait duration, bucketed at
the wait timeout.
Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com