Move sqlite logs to a dedicated database (#13772)

## Summary
- move sqlite log reads and writes onto a dedicated `logs_1.sqlite`
database to reduce lock contention with the main state DB
- add a dedicated logs migrator and route `codex-state-logs` to the new
database path
- leave the old `logs` table in the existing state DB untouched for now

## Testing
- just fmt
- cargo test -p codex-state

---------

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Charley CunninghamandCodex authored and GitHub committed 2026-03-06 10:54:20 -08:00
1 parent 51fcdc760d
commit 4e6c6193a1
7 files changed
+165 -31

No files matched your search

+2 -1
View File
@@ -1,3 +1,4 @@
use sqlx::migrate::Migrator;
pub(crate) static MIGRATOR: Migrator = sqlx::migrate!("./migrations");
pub(crate) static STATE_MIGRATOR: Migrator = sqlx::migrate!("./migrations");
pub(crate) static LOGS_MIGRATOR: Migrator = sqlx::migrate!("./logs_migrations");