fix(s7): a read pass that observes nothing reports nothing — empty pass no longer clears Faulted
This commit is contained in:
@@ -672,10 +672,17 @@ public sealed class S7Driver
|
||||
// arms abandon the batch mid-pass, and a partially-observed pass must not stamp a
|
||||
// verdict. LastSuccessfulRead advances whenever ANYTHING read, even into a
|
||||
// Degraded/Faulted state — see ReadPassOutcome for why that is load-bearing.
|
||||
_health = new DriverHealth(
|
||||
outcome.WorstFailure,
|
||||
outcome.AnySuccess ? now : _health.LastSuccessfulRead,
|
||||
outcome.WorstFailure == DriverState.Healthy ? null : outcome.FirstError);
|
||||
//
|
||||
// A pass that observed NOTHING — an empty batch, or one whose every reference was
|
||||
// unresolvable — reports nothing: it writes no health at all, preserving a prior
|
||||
// Faulted (e.g. the access-denied config alert) that a Healthy write would have erased.
|
||||
if (outcome.AnySuccess || outcome.WorstFailure != DriverState.Healthy)
|
||||
{
|
||||
_health = new DriverHealth(
|
||||
outcome.WorstFailure,
|
||||
outcome.AnySuccess ? now : _health.LastSuccessfulRead,
|
||||
outcome.WorstFailure == DriverState.Healthy ? null : outcome.FirstError);
|
||||
}
|
||||
}
|
||||
finally { _gate.Release(); }
|
||||
return results;
|
||||
|
||||
Reference in New Issue
Block a user