Commit Graph

4 Commits

Author SHA1 Message Date
Joseph Doherty 8d6b64393e fix(grpc-data): #967 a rich write whose invoker fails before dispatch on an externally-rejected claim releases its slot
When the invoker threw without running the dispatch delegate (open breaker /
bulkhead) after the claim had already been completed RejectedBeforeDispatch
by someone else, Complete(RichRejected) returned false, the path answered
OutcomeUnknown and never completed the physical task. The late-write slot,
the (driver, reference) target and the ticket's byte lease stayed reserved
for the process lifetime, so every later write to that tag was refused as
'Outstanding driver write capacity exhausted'.

Both catch paths now go through FailRichAttempt: an undispatched terminal
claim can never dispatch (dispatch is a CAS from pending), so the physical
task completes with the claim's pre-dispatch outcome and the caller hears
RejectedBeforeDispatch. Only a dispatched claim stays Unknown and is left
to the driver's own completion.
2026-12-02 13:19:44 -05:00
Joseph Doherty bcd4a9aa29 fix(grpc-data): #964 rich write releases its late-write slot before replying / freeing the tag
The late-write observer released the physical slot on its own continuation of
the driver task, while RunRichWriteAsync replied and told WriteCompleted on
another. A next write to the same target (queued, or sent right after the
reply) could reach TryReserve before the release and be rejected with
'Outstanding driver write capacity exhausted' although nothing was
outstanding. LateWriteReservation.Observe now returns a task that completes
after the slot is released; the actor awaits it (when the physical write has
finished) before replying and freeing the tag. The flaky unit test waited on
the lifetime counter, which is disposed just before the release - it now
awaits the settled task.

Repro: 200 sequential same-target actor writes failed 3/3 runs (no load);
0 failures in 15 runs at load avg ~468. Unit signal: lifetime-wait 22-39 /
2M false 'slot busy', settled-wait 0/2M.
2026-12-02 13:10:20 -05:00
Joseph Doherty 47960a6d57 feat: host tls data service and route node and cluster connections 2026-11-23 09:55:04 -05:00
Joseph Doherty 862dbc8e90 feat: preserve grpc write admission and uncertain outcomes 2026-11-23 09:55:04 -05:00