feat(grpc): add RunRawQueryOnSession seam for handshake-reuse spike
This commit is contained in:
@@ -102,12 +102,28 @@ internal sealed class HistorianGrpcReadOrchestrator
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Spike/Phase-1 seam (pending.md A1): run a raw query against an EXTERNALLY-supplied, already-
|
||||||
|
// authenticated connection + client handle — i.e. NO Create()/handshake here. RunRawChain delegates
|
||||||
|
// to this so the per-call path and the reuse path share one query implementation (DRY). The handshake
|
||||||
|
// reuse-probe test drives this directly to measure whether the server honors a reused session.
|
||||||
|
internal List<HistorianSample> RunRawQueryOnSession(
|
||||||
|
HistorianGrpcConnection connection,
|
||||||
|
uint clientHandle,
|
||||||
|
string tag,
|
||||||
|
DateTime startUtc,
|
||||||
|
DateTime endUtc,
|
||||||
|
int maxValues,
|
||||||
|
CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
HistorianDataQueryRequest request = HistorianWcfReadOrchestrator.BuildDataQueryRequest(tag, startUtc, endUtc, maxValues);
|
||||||
|
return RunQuery(connection, clientHandle, request, maxValues, cancellationToken);
|
||||||
|
}
|
||||||
|
|
||||||
private List<HistorianSample> RunRawChain(string tag, DateTime startUtc, DateTime endUtc, int maxValues, CancellationToken cancellationToken)
|
private List<HistorianSample> RunRawChain(string tag, DateTime startUtc, DateTime endUtc, int maxValues, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
using HistorianGrpcConnection connection = HistorianGrpcChannelFactory.Create(_options);
|
using HistorianGrpcConnection connection = HistorianGrpcChannelFactory.Create(_options);
|
||||||
uint clientHandle = OpenAuthenticatedConnection(connection, cancellationToken);
|
uint clientHandle = OpenAuthenticatedConnection(connection, cancellationToken);
|
||||||
HistorianDataQueryRequest request = HistorianWcfReadOrchestrator.BuildDataQueryRequest(tag, startUtc, endUtc, maxValues);
|
return RunRawQueryOnSession(connection, clientHandle, tag, startUtc, endUtc, maxValues, cancellationToken);
|
||||||
return RunQuery(connection, clientHandle, request, maxValues, cancellationToken);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<HistorianAggregateSample> RunAggregateChain(
|
private List<HistorianAggregateSample> RunAggregateChain(
|
||||||
|
|||||||
Reference in New Issue
Block a user