Files
kumomta/docs
Wez Furlong 8c3b297cda tsa: improve event_history storage
In a pathological configuration (essentially unbounded and continually
increasing number of campaigns, tenants, coupled with a synthetic
10% rate of triggering drastic bounce automation rules) I observed
that tsa could trip over itself when locking the sqlite db to
maintain the event history table.  This in turn causes delays
in responding to the shaping data endpoint, leading to timeout
errors in kumod.

This commit removes the sqlite-based event_history table that was
the source of that contention and replaces it with a much more
compact and easier to reason about set of in-memory data structures
built around a sharded hash map.  This makes it very quick to
insert and return the current count when assessing rules with
triggering thresholds.

This new state is serialized using msgpack and periodically saved
in the background, as well as on shutdown.
2025-04-11 10:04:31 -07:00
..
2023-10-18 16:18:56 -06:00
2025-02-28 08:41:16 -08:00
2025-03-21 16:56:12 -07:00
2025-02-27 06:01:11 -07:00
2025-02-20 13:04:57 +00:00
2025-02-20 16:00:16 -07:00