fix(grpc-data): H3 review D1/D4/D6/D7 — probe cancel, sub-batches, flush wake-up, request-order budget

D1: a caller cancel (the projected deadline) during the connection's capability
probe escaped as RpcException(Cancelled) and faulted the whole HistoryRead; it
is now OperationCanceledException, the probe is capped by HistoryTimeout, and
ProjectedHistoryAccess fails any escaping fault per node (BadTimeout when the
deadline fired) and releases every cursor it owns. D4: calls are sub-batched at
min(the deployed connection's batch, the origin's advertised MaxBatchItems) and
at most one item per 256 B of the remaining assembly budget; a shortfall is
BadTooManyOperations per node, never an endpoint failure. D6: the release flush
is re-armed from a flag under its gate (no lost wake-up) and the stop source is
never disposed under a running flush. D7: calls are runs of consecutive request
positions read in request order, then the budget is charged in request order.
Float32 node over a Double-returning backend reads Good Singles end to end (no
KindMatches defect). Red/green for D1/D4/D7 by mutation; D6's race did not
reproduce red.
This commit is contained in:
Joseph Doherty
2026-11-24 01:48:12 -05:00
parent 585d5079eb
commit 1237e9e6d1
6 changed files with 437 additions and 106 deletions
@@ -583,6 +583,8 @@ public sealed class DataConnectionDeploymentLease : IDataConnection, IDataHistor
internal Func<bool> RouteCurrent => _routeCurrent;
/// <summary>The configured row's operations, already masked to the understood set.</summary>
internal DataOperations AllowedOperations => _allowed;
/// <summary>The connection row's batch size: a history request with more items is refused (H3 splits below it).</summary>
internal int MaxBatchItems => _batch;
public IDataConnection Connection => this;
public CancellationToken CancellationToken => _scope;
public DataTarget Target => _inner.Target;