Skip to content

perf(db): configurable SQLite WAL synchronous level (#437) - #1239

Open
harshitethic wants to merge 2 commits into
useconcord:mainfrom
harshitethic:fix/437-configurable-wal-durability
Open

harshitethic wants to merge 2 commits into
useconcord:mainfrom
harshitethic:fix/437-configurable-wal-durability

Conversation

@harshitethic

Copy link
Copy Markdown
Contributor

Fixes #437. Use PRAGMA synchronous=NORMAL after WAL mode by default; allow CONCORD_SQLITE_SYNCHRONOUS=normal|full, validated at config load and propagated to control and workspace connections. Document the durability tradeoff in .env.example. Two regression tests verify both PRAGMAs, workspace propagation, defaults and invalid settings. Local Vitest, API typecheck and ESLint passed. Microbenchmark on the Linux validation VPS: 400 independent autocommit inserts, FULL 398.9 ms and NORMAL 7.9 ms (single run, environment-specific, not a performance guarantee). AI-assisted; review welcome.

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.

Set PRAGMA synchronous=NORMAL for WAL databases and make the durability level configurable

1 participant