Gateway historian: raw HistoryRead returns AVEVA synthetic boundary row as a stored sample #687
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found by the live AVEVA gate (2026-10-12). Pre-existing.
GatewayHistorianDataSource.cs:88-95/SampleMapper.ToSnapshotsmap every wire row, including AVEVA's start-boundary row (Quality=133, stamped at the query start, carrying the prior sample's value) and the no-data NULL row (Quality=1, value 0, Bad).Evidence:
[18:06:21, 18:06:39](no stored sample in the window) returned18:06:21 v=30 Good(no Interpolated bit) — a value never stored at that time.[18:05:00, 18:05:30](before the tag's first sample) returned18:05:00 v=0 Badinstead of an empty result (GoodNoData).Part 11 Raw with
ReturnBounds=falseexpects stored values only; the boundary row may also skew #669 paging (counted toward the page). Fix: drop the boundary/NULL rows (AVEVAQuality133 at the query start /Quality1 no-data — the #681 raw-aggregate reader already distinguishes them) unlessReturnBounds=true, where a boundary value should carry the bound semantics instead. Verify on the VPN.Fixed on master
1f5d3100(merge offix/685-687-688-gateway-mapping).Raw reads request
start − 1 ms(floored at the epoch) and keep only rows in[start, end)(astart == endpoint read stays inclusive); rows at/before the epoch are never stored samples. Shared helpers withRawAggregateReader(RequestStartFor,IsWindowSample). Budget = N + 16; if pre-window rows use it up, one bounded unclamped re-read. Streams always drained. ⚠️ Client-visible: Gateway forward raw reads now exclude a sample exactly at EndTime (matches the contract and SQL backends).Live AVEVA gate PASS: no Quality 133 / Quality 1 rows in any raw result; a stored NULL in the window still Bad; start exactly on a sample includes it; EndTime exclusive; StartTime = epoch clean. Follow-ups: #690 (stored NULL returned as value 0), #691 (ReturnBounds).