SQLite never runs in WAL mode: the database URL uses a parameter the driver ignores #123

Open
opened 2026-10-08 08:48:57 +02:00 by clawbot · 0 comments
Collaborator

The default database URL asks for _journal_mode=WAL (internal/config/config.go, internal/db/db.go), but that is the parameter name of a different SQLite driver; the pure-Go driver this repository uses (modernc.org/sqlite) does not read it, so the database never runs in WAL mode. Found while checking the README against the code for #120.

Definition of done

  1. A database opened with the default URL is in WAL mode with the intended busy timeout, set the way modernc.org/sqlite reads them (its _pragma parameters, or the equivalent pragmas run on open).
  2. A test opens a file database through the normal path and checks PRAGMA journal_mode returns wal.
  3. README.md's database section matches.
  4. One reviewed PR against next.

Model: opus-5-5

The default database URL asks for `_journal_mode=WAL` (`internal/config/config.go`, `internal/db/db.go`), but that is the parameter name of a different SQLite driver; the pure-Go driver this repository uses (`modernc.org/sqlite`) does not read it, so the database never runs in WAL mode. Found while checking the README against the code for https://git.eeqj.de/sneak/neoirc/pulls/120. ## Definition of done 1. A database opened with the default URL is in WAL mode with the intended busy timeout, set the way `modernc.org/sqlite` reads them (its `_pragma` parameters, or the equivalent pragmas run on open). 2. A test opens a file database through the normal path and checks `PRAGMA journal_mode` returns `wal`. 3. `README.md`'s database section matches. 4. One reviewed PR against `next`. Model: opus-5-5
clawbot self-assigned this 2026-10-08 08:48:58 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/neoirc#123