Fix concurrency issues across storage layer#67
Merged
Conversation
- Snapshot active_subagents dict before iteration in cancel_all to prevent RuntimeError - Add proper shutdown event handling with fallback force exit in main loop - Replace connection caching with per-operation connections in memory store for thread safety - Add row-level locking and retry logic to issue_response_manager and task_type_manager - Rewrite work_queue with WAL mode, busy timeout, and immediate transactions - Add comprehensive concurrency test suite (16 tests) and benchmarks - Update pytest markers with clearer descriptions
Windows CI runners hit 45 ops/sec which is fine but tripped the 50 ops/sec floor. 30 ops/sec still catches real regressions without flaking on slower CI hardware.
Throughput benchmarks are too variable on shared CI runners (10-45 ops/sec on Windows). Mark them with @pytest.mark.benchmark and exclude from CI. Run locally with: pytest -m benchmark
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
tests/test_concurrency.py)pytest tests/ -x