Phase 3 PR 33 — DriverHostStatus entity + migration (LMX #7 data layer) #32
Reference in New Issue
Block a user
Delete Branch "phase-3-pr33-driverhoststatus-entity"
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?
First data-layer piece of LMX follow-up #7 (per-AppEngine Admin dashboard drill-down). Adds the table the server-side publisher writes to and the Admin UI will poll. No publisher or page yet — that's PR 34.
Schema
DriverHostStatus, composite PK(NodeId, DriverInstanceId, HostName):IDriver.DriverInstanceId.host:port, etc).DriverHostStateenum persisted as string (readable in DBA tools).now - LastSeen > thresholdto flag stale rows from a crashed Server.Indexes:
IX_DriverHostStatus_Node(per-cluster drill-down via join on ClusterNode.ClusterId),IX_DriverHostStatus_LastSeen(stale-row query).Design notes
(server node, driver, host)— a redundant 2-node cluster with one Galaxy driver reporting 3 platforms produces 6 rows, not 3, because each server node owns its own runtime view. The composite key lets both views coexist without shadowing each other.ClusterNode— a Server may start reporting host status before itsClusterNoderow exists (first-boot bootstrap). We'd rather keep the row than drop it; Admin left-joins on NodeId when rendering.DriverHostStateenum lives inConfiguration.Enums/, not reusingCore.Abstractions.HostState. Keeps Configuration free of driver-runtime deps — both Admin + Server reference Configuration, and pulling inCore.Abstractionsto every Admin build would be unnecessary weight. Publisher translates on the way in.HasConversion<string>()). DBAs see'Faulted'/'Running'in queries, not3/1.Tests
DriverHostStatusTests(3 new SchemaCompliance cases using the shared fixture DB):SchemaComplianceTests.All_expected_tables_existextended to include the new table.Test posture
Next
PR 34 — server-side publisher hosted service (subscribes to each driver's
OnHostStatusChanged+ periodic heartbeat, upserts rows) + Admin UI/hostspage + background poller pattern mirroringFleetStatusPoller.