Implement the in-repo AutoDowning-equivalent DowningProvider (plan in #51) #106
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?
Implement the AutoDowning replacement planned in #51 (docs/plans/2026-11-09-autodowning-replacement-plan.md): an in-repo
DowningProviderthat reproduces Akka's deprecated AutoDowning (the leader among reachable members downs a peer unreachable forstable-after), added as a new downing-strategy value alongsideauto-downon Akka 1.5.62. Prove it with HOCON/validator unit tests, two-node real-cluster clones of SbrFailoverTests' oldest-crash and younger-crash cases, andDRILL_MODE=active bash docker/failover-drill.shon the rig; only then switch the default and roll rig → env2 → QA → DEV/sites (rollback = appsettings back to auto-down). Must land before any Akka.NET upgrade that removes AutoDowning.Provider implemented on main
ab561faa— default unchanged (auto-down): new strategyleader-auto-down= LeaderAutoDowningProvider (Host/Actors), a line-for-line port of Akka.Cluster 1.5.62 AutoDowning/AutoDown/AutoDownBase (acts only as leader among reachable members; downs a peer unreachable for StableAfter; non-leader keeps pending and downs on becoming leader; reachable/removed peers forgotten; Down/Exiting skipped). Timeout fromscadabridge.cluster.leader-auto-down.unreachable-afterso the deprecated key (and Akka's boot warning) is never emitted; DownRemovalMargin read like AutoDowning. BuildHocon emits it only for the new value (auto-down / keep-oldest HOCON byte-identical); validator accepts it. Placed in Host, not ClusterInfrastructure (that project is Akka-free by rule) — plan doc updated. Evidence: 13 unit tests ported from Akka's spec + real two-node oldest-crash/younger-crash clones pass with the same outcomes as auto-down; the loaded provider on both nodes is verified to be LeaderAutoDowningProvider; five deliberate breakages each fail tests. ClusterInfrastructure 46, Host 640, IntegrationTests cluster subset 23; re-run green after rebase. Remaining gates before flipping the default (tracked in #51's plan §5–6): docker failover drill (active + standby) on central + a site pair, live boot log without the deprecation warning, partition dual-active check, then rig → env2 → QA → DEV with pairs stopped/started together.Completed on main
456c6659, on top ofab561faa. The default is stillauto-down, and the new strategy is opt-in viaSplitBrainResolverStrategy: leader-auto-down.Added
Decision logging. Every downing decision is logged with a
[leader-auto-down]prefix:DOWNING(Warning), logged beforeCluster.Down.The decision logic itself is unchanged.
IntegrationTests/Cluster/LeaderAutoDownScenarioTests. These run a real two-node cluster built from the productionBuildHoconwith self-first seeds. All 7 pass:down-if-aloneself-downs on a cold recreate) → the node stays Up, then the peer cold-starts and joins;trttlthrottlerBlackhole. Each cut makes it unreachable for less than the window, and the cuts repeat for longer than the window in total. It is never downed. A positive control asserts that at least 3 of the 4 cuts really made the peer unreachable;auto-downloadsAutoDowning,keep-oldestloadsSplitBrainResolverProvider, and onlyleader-auto-downloads the in-repo provider.Unit tests (Host). A flapping member is never downed. A member that flaps and then stays unreachable is downed exactly once, a full window after its last unreachable event. Each decision log line is asserted with
EventFilter.Mutation-proved. Each of these deliberate breakages makes tests fail:
ReachableMember→ both unit flapping tests, the cancel-log test and the real-cluster flapping test fail;auto-downwired to the new provider → the switch-off theory fails.Verification.
dotnet build ZB.MOM.WW.ScadaBridge.slnxhas 0 warnings. Host.Tests 679/679, ClusterInfrastructure.Tests 56/56, IntegrationTests.Cluster.subset 30/30. After rebasing, the LeaderAutoDown and HoconBuilder tests were re-run and passed (34 and 10).Not done: the docker failover drill. Running it would rebuild the shared
scadabridge:latestimage and reuse the shared rig volumes while another agent was working in the repo. The drill (central + site-a, active and standby modes, boot-log check) and the rollout from rig → env2 → QA → DEV are tracked as deploy gate #116. Closing this issue as implemented.