fix(historian): #691.4 review — Null reports SupportsReverseEvents = true, like raw

The null source has no history in either direction; reporting false
made the server walk an empty reverse events read back through three
empty forward reads. It now answers the reverse overload with the empty
result itself (guard test unchanged: it still declares both members).
This commit is contained in:
Joseph Doherty
2026-10-12 17:37:32 -04:00
parent d28e3e64f1
commit 574c3aa1b0
5 changed files with 16 additions and 17 deletions
@@ -5291,7 +5291,7 @@ public sealed class OtOpcUaNodeManager : CustomNodeManager2
reverse = startUtc > endUtc;
}
// A reverse read on a backend that cannot read newest-first (Gateway, Null) is never sent there (#675 refused it
// A reverse read on a backend that cannot read newest-first (the Gateway) is never sent there (#675 refused it
// here); since #691.4 it is walked back from bounded forward reads — the raw walk (#686), with ties ordered by
// EventId because the gateway orders by event time only. Decided by the capability, not by catching an
// exception, so a NotSupportedException thrown from inside a backend stays a backend fault.
@@ -9,7 +9,7 @@ internal readonly record struct ReverseEventsPage(List<HistoricalEvent> Events,
/// <summary>
/// Gitea #691.4: serves a Part 11 reverse events read — <c>(lo, hi]</c> newest-first — on a backend that reads events
/// forward only (<see cref="IHistorianDataSource.SupportsReverseEvents"/> = <c>false</c>: Gateway, Null) with the
/// forward only (<see cref="IHistorianDataSource.SupportsReverseEvents"/> = <c>false</c>: the Gateway) with the
/// <see cref="ReverseWalk"/>. A segment read is cut short when the source flags truncation (its continuation point); ties
/// are ordered by <see cref="EventIdTieOrder"/> because the gateway orders by event time only.
/// </summary>