wrolpi/wrolpi/files
Roland b9a892b203
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Controller Tests / controller-tests (push) Has been cancelled
Jest Tests / jest-tests (push) Has been cancelled
fix: act on review — don't hold the write lock across the source-tree walk
Two review points, both correct.

The planning session was opened before the filesystem collection that runs inside it, so
BEGIN IMMEDIATE held the write lock across every glob and directory walk - trading an
instant abort for minutes of global write starvation on a large channel.  The collection
now finishes before the session opens; only the temp-table load, the FileGroup reads and
inserts, and the commit run under the lock.  `file_source_set` is built during that same
pass instead of re-globbing every file source a second time.

`test_file_worker_move_survives_concurrent_writer` held the lock across the whole move, so
planning waited it out and the execute phase usually met no contention - the test would
have stayed green if only the execute site regressed.  It now takes the lock after planning
returns.  Verified by mutation: reverting either site alone fails its own test.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 19:53:44 -06:00
..
test fix: act on review — don't hold the write lock across the source-tree walk 2026-08-01 19:53:44 -06:00
__init__.py Add Docs module for searching and organizing PDFs and EPUBs 2026-03-20 14:17:06 -06:00
api.py Search: fast ABC mode by default, opt-in deep search 2026-07-03 10:32:16 -06:00
downloader.py Migrating FileDownloader. 2026-05-07 15:54:53 -06:00
indexers.py HTML indexer is binary-safe; it indexes the page inside a compressed singlefile. 2026-06-12 17:24:02 -06:00
lib.py fix: a concurrent writer no longer aborts a file move with "database is locked" 2026-08-01 19:52:23 -06:00
models.py SQLite: make the browse pages index-only. 2026-07-14 07:46:29 -06:00
schema.py Search: fast ABC mode by default, opt-in deep search 2026-07-03 10:32:16 -06:00
worker.py fix: act on review — don't hold the write lock across the source-tree walk 2026-08-01 19:53:44 -06:00