fix(site-event-log): queries on own read connection off the actor thread, bounded keyword window; cap trim counts/vacuums rarely (review 2026-10-21 02/P1, 02/P4)

This commit is contained in:
Joseph Doherty
2026-10-22 08:30:35 -04:00
parent f7c4adbaed
commit 3169429c3f
9 changed files with 194 additions and 35 deletions
@@ -98,4 +98,14 @@ public class SiteEventLogOptions
/// so the drop is observable.
/// </summary>
public int WriteQueueCapacity { get; set; } = 10_000;
/// <summary>
/// Widest time window a <em>keyword</em> search may scan; default 7 days. The keyword filter
/// is a leading-wildcard <c>LIKE</c> over <c>message</c>/<c>source</c> that full-scans the
/// window, so an unbounded search against a log at its storage cap walks millions of rows.
/// A keyword query with no <c>From</c> (or a wider range) is clamped server-side to
/// <c>[To ?? now - window, To ?? now]</c> rather than rejected, so existing callers keep
/// working (review 2026-10-21 02/P1).
/// </summary>
public TimeSpan KeywordSearchMaxWindow { get; set; } = TimeSpan.FromDays(7);
}