From a3752799de9c47526b43979ae3510c4712ff1cee Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Sun, 14 Jun 2026 02:35:59 -0400 Subject: [PATCH] worker(alarms): remove dead FailoverAlarmConsumer.subscriptionExpression MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit B4: the field was stored in Subscribe but never read — the primary is never re-subscribed during probing. Drop it and keep the rationale as a comment. --- .../MxAccess/FailoverAlarmConsumer.cs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/ZB.MOM.WW.MxGateway.Worker/MxAccess/FailoverAlarmConsumer.cs b/src/ZB.MOM.WW.MxGateway.Worker/MxAccess/FailoverAlarmConsumer.cs index b40c614..079c8b9 100644 --- a/src/ZB.MOM.WW.MxGateway.Worker/MxAccess/FailoverAlarmConsumer.cs +++ b/src/ZB.MOM.WW.MxGateway.Worker/MxAccess/FailoverAlarmConsumer.cs @@ -65,13 +65,6 @@ public sealed class FailoverAlarmConsumer : IMxAccessAlarmConsumer private bool disposed; private DateTime lastProbeAtUtc = DateTime.MinValue; - /// - /// The subscription expression passed to . - /// Stored for documentation and potential future full re-subscribe - /// scenarios; the primary is NOT re-subscribed during probing. - /// - private string subscriptionExpression = string.Empty; - /// /// Composes the failover consumer over its two children. /// @@ -119,9 +112,9 @@ public sealed class FailoverAlarmConsumer : IMxAccessAlarmConsumer { if (disposed) throw new ObjectDisposedException(nameof(FailoverAlarmConsumer)); - // Store for documentation; the primary is not torn down on failover - // and is therefore not re-subscribed during ProbeOnce. - subscriptionExpression = subscription; + // The primary is not torn down on failover and is therefore never + // re-subscribed during ProbeOnce, so the subscription expression does + // not need to be retained here. // Arm the standby first so it is warm regardless of primary outcome. // A standby subscribe failure is a hard fault (the fallback itself is