fix: run conversation deletion off event loop - #3996
Conversation
|
Benchmark results (SQLite, PR #3996)Commit: Benchmark comparisonRegression threshold: 100% on avg P50 or avg P95.
PASS — no regressions detected. |
Signed-off-by: SabhyaC26 <sabhyachhabria@gmail.com>
8fabf67 to
85ebf70
Compare
Related issue
N/A (reported directly)
Summary
SqlAlchemyConversationStore.delete_conversationto a worker thread so its recursive CTE and cross-database deletes cannot block the server event loop.ELI5: the server now hands the slow database cleanup to a worker instead of making every live request wait behind it.
async request -> asyncio.to_thread -> existing recursive deleteTest Plan
pytest -q tests/stores/test_conversation_store.py tests/stores/test_conversation_store_split_db.py -k 'delete_conversation'— 7 passed.Reply with exactly DELETE-E2E-READY. Do not use tools., and receivedDELETE-E2E-READY.Demo
N/A — backend concurrency fix; verified through the live UI and Browser workflow above.
Type of change
Test coverage
Coverage notes
Manual verification used the current branch's live backend, a real connected local host, and the Browser UI. The recursive delete ran long enough to expose the original freeze while concurrent probes verified that the event loop remained responsive.
Changelog
Deleting large agent conversation trees no longer freezes other server activity.