# fix\(server\): windowed thread snapshots no longer wait on the SQLite writer · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/commit/247703a96beef10242b642a78f6fbd324d42545c)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

Requested revision: 247703a96beef10242b642a78f6fbd324d42545c

Requested commit: 247703a96beef10242b642a78f6fbd324d42545c

Commit: 247703a96beef10242b642a78f6fbd324d42545c

Tree: 72fcc1b6e08f2962479c365b4c23398beb95eef5

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
fix(server): windowed thread snapshots no longer wait on the SQLite writer

getThreadSnapshotWindow ran its reads in a writer transaction, so a held
writer made opening a thread fail with "database is locked". Run the
transaction on the reader with NodeSqliteClient.readOnly, as ShellStream
and ThreadSearch already do. The snapshot only reads, and inside an open
write transaction the reads still use the writer.

Fixes #21840. Implementation from #21869 by ScottN-PV.

Co-Authored-By: ScottN-PV <191782757+ScottN-PV@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

```

## Parents

- [9f597f2058525acf166625c134efcee950b7c570](https://git.cafe/pingdotgg/t3code/commit/9f597f2058525acf166625c134efcee950b7c570?format=markdown)

[Source at this commit](https://git.cafe/pingdotgg/t3code/tree/247703a96beef10242b642a78f6fbd324d42545c?format=markdown)
