fix(grpc-data): move the in-stream root re-resolve off the condition frame loop (#934)

RetryDueAsync awaited the root metadata request (10 s budget) inside the
frame loop, stalling every mapping's frames on that connection while the
origin's metadata was slow. The request now runs as a task (FetchRootsAsync
reads only the immutable root views); the task joins the loop's wake set
beside the retry timer, and its answer is applied on the loop
(ApplyResolvedAsync: RootView or MarkRefused, then the re-add). All runner
state stays loop-owned. While resolving the mapping is Unavailable (unknown,
T2) and is not re-scheduled. Test: a hung second metadata call no longer
blocks another mapping's delta; releasing it re-adds the item exactly once.
This commit is contained in:
Joseph Doherty
2026-11-25 10:58:28 -05:00
parent 2eb31f62d2
commit 5d946fde55
3 changed files with 142 additions and 32 deletions
+3 -1
View File
@@ -424,7 +424,9 @@ refresh, EventIds) is documented in [Alarm tracking § Imported conditions](Alar
- A mapping that completes late is merged in.
- An `Unavailable` mapping (item refused, root metadata failed, snapshot timed out) or a `ConditionCapacity` mapping is
**retried on the open stream** (#930). Its root is re-resolved if it never resolved, any item it still holds is removed,
and a new item is added. The stream is not ended for it, so the healthy mappings are never re-snapshotted and their
and a new item is added. The root re-resolve (metadata, 10 s budget) runs off the stream's frame loop (#934): frames of
the other mappings keep flowing meanwhile, the mapping stays `Unavailable` until the answer is applied on the loop, and
its item is re-added then. The stream is not ended for it, so the healthy mappings are never re-snapshotted and their
methods are never answered `BadNoCommunication` because of it.
- Retry delay, per mapping. A **definitive** refusal (`Denied`, `NotFound` or `Unsupported`, for the item or the root
metadata) or `ConditionCapacity` waits `LongRetryDelay` (5 min) × 2ⁿ, capped at 4× (20 min). Any other refusal or a