mirror of
https://github.com/openai/codex.git
synced 2026-10-20 17:38:45 +00:00
## Why Opening an initialized database in `DELETE` journal mode previously attempted to convert it to `WAL`, which could fail while another connection held a write lock. ## What changed - Initialize `WAL` and incremental auto-vacuum only for databases without a schema, including files left by interrupted initialization. - Preserve journal and vacuum modes for initialized databases, use `synchronous = EXTRA` for `DELETE` connections, and retain `NORMAL` for `WAL`. - Close failed initialization pools before retrying and restrict background page reclamation to `WAL` databases. ## Testing Extend SQLite tests to cover interrupted initialization, opening `DELETE` databases under a write lock across all pool connections, persistence after reopening, and lock release after failed initialization. GitOrigin-RevId: 23acecfe472618dde8545815e9a1058a51591235