fix(review): calc ReadOne reports an inputs-Bad publish; VT inputs-bad counter ticks only on a real report
This commit is contained in:
@@ -394,7 +394,11 @@ public sealed class CalculationDriver : IDriver, IDependencyConsumer, ISubscriba
|
||||
var now = DateTime.UtcNow;
|
||||
lock (_lock)
|
||||
{
|
||||
if (!_stateByRawPath.TryGetValue(reference, out var st) || !st.HasValue)
|
||||
// Gated on HAS PUBLISHED, not on "has a value": a tag whose only publish was an inputs-Bad
|
||||
// report has no value of its own, and answering BadWaitingForInitialData for it would tell a
|
||||
// polled reader "never observed" while the subscriber on the same node had been told
|
||||
// BadNoCommunication. Something HAS been observed about such a tag — that its input is dead.
|
||||
if (!_stateByRawPath.TryGetValue(reference, out var st) || !st.HasPublished)
|
||||
return new DataValueSnapshot(null, StatusBadWaitingForInitialData, null, now);
|
||||
// Exactly what the subscriber was last told — including a propagated input sub-code. Deriving
|
||||
// it from a two-state flag here would make a read disagree with the subscription over the
|
||||
|
||||
Reference in New Issue
Block a user