llama-stack-mirror/llama_stack/providers/utils/responses
Ashwin Bharambe f0b2ca1ebc fix: enable SQLite WAL mode to prevent database locking errors (#4048)
Fixes race condition causing "database is locked" errors during
concurrent writes to SQLite, particularly in streaming responses with
guardrails where multiple inference calls write simultaneously.

Enable Write-Ahead Logging (WAL) mode for SQLite which allows multiple
concurrent readers and one writer without blocking. Set busy_timeout to
5s so SQLite retries instead of failing immediately. Remove the logic
that disabled write queues for SQLite since WAL mode eliminates the
locking issues that prompted disabling them.

Fixes: test_output_safety_guardrails_safe_content[stream=True] flake
(cherry picked from commit 2381714904)
Signed-off-by: Charlie Doern <cdoern@redhat.com>
2025-11-24 14:10:20 -05:00
..
__init__.py ci: add python package build test (#2457) 2025-06-19 18:57:32 +05:30
responses_store.py fix: enable SQLite WAL mode to prevent database locking errors (#4048) 2025-11-24 14:10:20 -05:00