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
perf: bound flush() latency with per-event timeout and concurrent sends #64
flush() now sends events individually (one POST per event) to match the server's flat db.Event struct. With batch_size=10 and the default httpx 10s timeout, a single flush could block for up to ~100s in the worst case if the registry is slow or unreachable.
The old batch approach had the same 10s timeout but for a single request. In practice the registry responds in <100ms so this isn't a production issue today, but it's a latent risk.
Proposed improvements
Per-event timeout — reduce from inherited 10s to ~2s for event ingestion POSTs
Concurrent sends — use a thread pool or asyncio.gather to send events in parallel rather than sequentially
Overall deadline — cap total flush duration regardless of event count (e.g., 5s total)
Activity