fix(mam-api): add last_seen_at to cluster_nodes for playout failover
Playout failover queries cluster_nodes.last_seen_at to find healthy nodes for channel re-placement. Column missing from original cluster schema. Migration 031 adds column + backfills existing nodes to NOW(). Fixes scheduler error: column "last_seen_at" does not exist Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
42064acefa
commit
c2409bd037
1 changed files with 10 additions and 0 deletions
|
|
@ -0,0 +1,10 @@
|
|||
-- Migration 031 — Add last_seen_at to cluster_nodes
|
||||
--
|
||||
-- Playout failover (routes/playout.js restartChannel) queries cluster_nodes.last_seen_at
|
||||
-- to find healthy nodes for channel re-placement. Column was missing from original
|
||||
-- cluster schema; heartbeat endpoint updates it via /cluster/heartbeat.
|
||||
|
||||
ALTER TABLE cluster_nodes ADD COLUMN IF NOT EXISTS last_seen_at TIMESTAMPTZ;
|
||||
|
||||
-- Backfill existing nodes to NOW() so they're immediately eligible for failover
|
||||
UPDATE cluster_nodes SET last_seen_at = NOW() WHERE last_seen_at IS NULL;
|
||||
Loading…
Reference in a new issue