feat: apply SQLite WAL pragmas and a writer/readonly pool - #910
feat: apply SQLite WAL pragmas and a writer/readonly pool#910numdinkushi wants to merge 1 commit into
Conversation
|
@numdinkushi is attempting to deploy a commit to the ritik4ever's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@numdinkushi Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Commit Type
Breaking change? (If yes, add
BREAKING CHANGEin the commit footer)What changed
SQLite init now applies WAL,
busy_timeout=5000, andcache_size=-64000frombackend/src/services/sqlite/.initDb()opens one writer (getDb()) plus a readonly reader (getReadDb(),SQLITE_READ_POOL_SIZE, max 4). In-memory databases skip extra readers.Tuning is recorded in
docs/adr/0006-sqlite-wal-and-pool-tuning.md.Existing
getDb()call sites are unchanged.Testing done
npx vitest run src/services/sqlite src/db/concurrency.test.ts— 12 passedinitDb()applies the same pragmasnpx eslint src/services/db.ts src/services/sqlite src/db/concurrency.test.tsRelated issues
Closes #731
Checklist