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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user