fix(host): unify active-node on oldest-member semantics — purge/self-report/labels now track the singleton host

This commit is contained in:
Joseph Doherty
2026-07-08 15:48:07 -04:00
parent 6320be9954
commit da6d5ae12c
5 changed files with 70 additions and 21 deletions
@@ -109,8 +109,8 @@ public static class SiteServiceRegistration
// The EventLogPurgeService runs on every
// site host node but consults this optional gate each tick and early-exits on
// the standby. Register it to delegate to IClusterNodeProvider.SelfIsPrimary
// (the canonical "this node is Up AND cluster leader" check) so purge runs ONLY
// on the active node — no duplicated cluster logic. Non-clustered test hosts that
// (the canonical "this node is the oldest Up member (singleton host)" check) so purge
// runs ONLY on the active node — no duplicated cluster logic. Non-clustered test hosts that
// never call SiteServiceRegistration leave it unregistered, so the purge defaults
// to always-run (the pre-fix behaviour, preserved).
services.AddSingleton<SiteEventLogActiveNodeCheck>(sp =>