Skip to content

fix: serialize SQLite session writes with shared file locks#2843

Merged
seratch merged 1 commit intomainfrom
fix/sqlite-session-concurrency-locking
Apr 4, 2026
Merged

fix: serialize SQLite session writes with shared file locks#2843
seratch merged 1 commit intomainfrom
fix/sqlite-session-concurrency-locking

Conversation

@seratch
Copy link
Copy Markdown
Member

@seratch seratch commented Apr 4, 2026

This pull request fixes SQLite session concurrency by sharing a process-local RLock across sessions that point at the same file-backed database and by running AdvancedSQLiteSession.add_items() base-row insertion plus structure-metadata insertion inside one lock-protected critical section.

It also routes branch/message-structure reads and writes through the same lock helper and adds regression coverage for shared file locks and concurrent AdvancedSQLiteSession writes so message rows and structure rows stay aligned.

@seratch seratch added this to the 0.13.x milestone Apr 4, 2026
@github-actions github-actions bot added bug Something isn't working feature:sessions labels Apr 4, 2026
@seratch seratch merged commit 6a89f1b into main Apr 4, 2026
9 checks passed
@seratch seratch deleted the fix/sqlite-session-concurrency-locking branch April 4, 2026 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working feature:sessions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant