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:
@@ -20,10 +20,14 @@ public class EventLogHandlerActor : ReceiveActor
|
||||
{
|
||||
_queryService = queryService;
|
||||
|
||||
// The query is synchronous SQLite I/O (a keyword search can scan millions of
|
||||
// rows), so run it on the thread pool and pipe the reply back rather than pinning
|
||||
// an Akka dispatcher thread (review 2026-10-21 02/P1). ExecuteQuery never throws —
|
||||
// it returns Success:false — so no failure mapper is needed beyond the safety net.
|
||||
Receive<EventLogQueryRequest>(msg =>
|
||||
{
|
||||
var response = _queryService.ExecuteQuery(msg);
|
||||
Sender.Tell(response);
|
||||
var service = _queryService;
|
||||
Task.Run(() => service.ExecuteQuery(msg)).PipeTo(Sender);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user