Dev

Source summary refreshes no longer hold producer database connections

In Multimodal Input Pipeline, source-summary refreshes after commit are now handled by a dedicated background queue. Repeated events for one source are coalesced, executed by one worker outside the producer transaction connection, and manual package regeneration uses shorter transactions.

In Multimodal Input Pipeline, the way background source-summary refreshes run after commit has changed. Previously, refresh work could remain tied to the transaction cleanup moment while the primary database connection had not yet returned to the pool; parallel commit callbacks could accumulate waiting tasks and make processing slow or appear stuck. Now the listener passes only the source identifier to a new SourceSummaryRefreshQueue. One background worker performs refreshes, up to 128 requests can wait, repeated requests for the same source are coalesced, and an event arriving during execution leaves one trailing refresh. The queue is best-effort and does not preserve work across restarts: when it is full or the application shuts down, the request is safely skipped with a warning and state can be recovered through regeneration. Manual package regeneration also uses narrower transactions: short reads and writes are separated, while external provider/Handoff work runs outside an encompassing transaction, including the single-source route. Spring and Hikari checks verify that a producer transaction is not stalled behind a one-connection pool during refresh work and that rollback does not enqueue refresh work.

← Back to news