You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(pipeline): digest never drains on channel close; events lost on shutdown #331
crates/trapfalld/src/digest.rs:47-67: Some(event) = self.rx.recv() only disables its select branch when the channel closes; the interval branch is always ready so else never fires and the loop never exits.
crates/trapfalld/src/main.rs:249-255: axum::serve has no with_graceful_shutdown; after it returns, digest_handle.abort() kills the task without a final flush.
Impact
Events already acked with HTTP 200 (up to 50 in batch + queued in the 1024 mpsc) are lost on SIGTERM/restart/deploy.
Fix
match self.rx.recv().await { None => { flush; break } Some(e) => ... } inside the select.
Handle ctrl_c/SIGTERM, graceful shutdown, drop ingest_tx, then digest_handle.await instead of abort().
Add a test: send N events, close channel, assert all persisted.
Activity
fix(digest): drain queue and flush on channel close; graceful shutdown (