Commit Graph
2 Commits
Author SHA1 Message Date
obscuremind 20bb7dfa68 fix(cluster): serve-only loopback gate reads the replica, not self::db(); + gate test
Final-review fixes (XC_VM side). The startMonitor serve-only gate read the
stream row via self::db(), which would throw on a serve-only LB (it has no
MySQL — it serves from the replica); switch to StreamSource::serverRow, which
reads the replica (and is loader-stubbable). Add the missing behavioral test
for the gate: a serve-only loopback stream returns MONITOR_FANOUT (fails if the
gate is removed). nodeServeOnly tests unchanged.
2026-10-18 20:36:19 +00:00
obscuremind e820eb2eb9 feat(cluster): a serve-only LB leaves loopback to the Go agent, not PHP
Phase 5 Task 2. On a serve-only node (Part A marker CONFIG_PATH/cluster/serve_only),
the Go agent registers a loopback stream's node-local relay URL with the puller
and the daemon pulls it. startMonitor now, before the supervise/PHP paths,
returns MONITOR_FANOUT for a loopback stream (parent_id > 0) on such a node, so
cron:streams never spawns a PHP MonitorCommand/LoopbackCommand for it — otherwise
the daemon would be double-fed (PHP push + puller pull). nodeServeOnly() reads
the marker; a normal node is unaffected (the gate is behind nodeServeOnly).
2026-10-18 20:07:26 +00:00