Files
codex/codex-rs/thread-store/src
Dmitriy Kovalenko 45bdafbda0 Defer paginated thread history updates on NFS (#63456)
## Why

Live rollout writes also update SQLite, so lock contention in rollback
journal mode can delay recording thread activity.

## What changed

For local threads with paginated history on NFS, defer SQLite updates on
the live write path and materialize rollout history when serving history
pages. For pools configured to prefer rollback journaling, cap the pool
at two connections and allow 60 seconds for SQLite locks and 120 seconds
to acquire a connection.

Skip work already committed by another history reader. Remove rollout
files before clearing their history checkpoints and reject stale batches
that would recreate deleted history.

## Testing

Extend the thread deletion test to verify that applying a stale batch
after deletion returns `ThreadNotFound`. Check SQLite settings on every
connection using the configured pool size.

GitOrigin-RevId: e2a3c19bc8fec0a97075d468767929ce396b65e3
2026-11-23 22:14:21 +00:00
..