Skip to content

[tx] Use WAL mode for sqlite#1054

Merged
pcmoritz merged 2 commits intoNovaSky-AI:mainfrom
pcmoritz:tx-sqlite-wal
Feb 8, 2026
Merged

[tx] Use WAL mode for sqlite#1054
pcmoritz merged 2 commits intoNovaSky-AI:mainfrom
pcmoritz:tx-sqlite-wal

Conversation

@pcmoritz
Copy link
Collaborator

@pcmoritz pcmoritz commented Feb 8, 2026

This PR enable WAL mode to allow reading the database while it is being written to (by a single writer). We also activate busy_timeout so multiple writers will retry to avoid 'database is locked' errors.


Open with Devin

@pcmoritz pcmoritz added the tx label Feb 8, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request enables WAL mode for SQLite databases, which is a great improvement for allowing concurrent reads and writes. The implementation correctly uses SQLAlchemy events to set the necessary PRAGMAs for new connections. I've added one suggestion to improve the new function's maintainability by adding a type hint and removing a magic number. Overall, this is a solid change.

Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

@pcmoritz pcmoritz merged commit fe0cf2b into NovaSky-AI:main Feb 8, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant