feat(grpc-data): H2 consumer history client and deployed-connection history

GrpcDataConnection implements IDataHistoryService (explicitly; ReadHistoryAsync/ReleaseHistoryAsync avoid an overload
clash with ReadAsync): the capabilities probe always asks for history, other calls send it only when the selected
endpoint advertised it; per-call deadline min(remaining, HistoryTimeoutMilliseconds); FAILED_PRECONDITION/UNIMPLEMENTED
=> BadHistoryOperationUnsupported; chunks assembled within the request budget (BadTooManyOperations past it); page
tokens wrapped with the issuing endpoint + serving incarnation so a resumed read never moves; release forwarded. The
deployment lease gates history on the row's HistoryRead bit and carries HistoryTimeout. Decoded capabilities drop
HistoryRead without the history field. X0 tests that used bit 32 as the unknown bit now use a still-reserved bit.
This commit is contained in:
Joseph Doherty
2026-11-23 20:57:35 -05:00
parent d0756bb78e
commit b36c8d8716
10 changed files with 614 additions and 31 deletions
@@ -33,10 +33,14 @@ public sealed class LocalDataConnection : IDataConnection, IDataConnectionPublic
/// Direct runtime-consumer history (H2): this facade is the channel, so its origin continuations live only as long as
/// the facade and are cleared on <see cref="DisposeAsync"/>. Answers are never chunked.
/// </summary>
public Task<IReadOnlyList<DataHistoryReadResult>> ReadAsync(DataHistoryReadRequest request, CancellationToken cancellationToken)
public Task<IReadOnlyList<DataHistoryReadResult>> ReadHistoryAsync(DataHistoryReadRequest request, CancellationToken cancellationToken)
{ Check(); return _services.ReadHistoryAsync(_context, Target, request, OwnChannel, chunked: false, cancellationToken); }
public Task ReleaseAsync(IReadOnlyList<byte[]> continuations, CancellationToken cancellationToken)
public Task ReleaseHistoryAsync(IReadOnlyList<byte[]> continuations, CancellationToken cancellationToken)
{ Check(); return _services.ReleaseHistoryAsync(_context, continuations, OwnChannel, cancellationToken); }
Task<IReadOnlyList<DataHistoryReadResult>> IDataHistoryService.ReadAsync(DataHistoryReadRequest request, CancellationToken cancellationToken) =>
ReadHistoryAsync(request, cancellationToken);
Task IDataHistoryService.ReleaseAsync(IReadOnlyList<byte[]> continuations, CancellationToken cancellationToken) =>
ReleaseHistoryAsync(continuations, cancellationToken);
/// <inheritdoc />
public Task<IReadOnlyList<DataHistoryReadResult>> ReadForTransportAsync(DataHistoryReadRequest request, DataHistoryChannel channel,
CancellationToken cancellationToken)