#1035 Activity worker LISTEN channel is never notified for highway.activity_queue inserts; claiming relies on fallback polling only

open medium engine resilience Created 2026-10-20 07:10 · Updated 2026-10-20 07:10

Description

Edit
Found during #906. The activity worker LISTENs on jumper_highway_activity (#246). The only pg_notify on that channel is the trigger on jumper.r_highway_activity (migration 01KCFHD8B7H2NNKS17AHAH1PH8_highway_0_0_31_jumper_notify_triggers.sql:72); ActivityOperator inserts into highway.activity_queue, which has no notify trigger (submodule-aware grep of all migration roots). Evidence: the #906 scratch-DB e2e (scripts/verify_906/activity_worker_e2e_906.sh) ran 5 activities with DEBUG logging on for engine.services.activity_worker.worker: 0 'Woke via LISTEN/NOTIFY' lines, every claim came from the 0.5 s fallback poll (positive control: other DEBUG lines of the same logger, e.g. 'Submitted activity ... to bulkhead', are present). Consequence: pickup latency is the poll interval (1 s default), not <100 ms, and with [activity_worker] enable_fallback_polling=false the worker would never claim an activity. Fix direction: AFTER INSERT trigger on highway.activity_queue (and on status -> pending for retries) calling pg_notify('jumper_highway_activity', activity_id), via a migretti migration; red-first scratch-DB test with fallback polling disabled.

Comments

Loading comments...

Context

Loading context...

Audit History

View All
Loading audit history...