wrolpi/modules
Roland f61cbb6e81
videos: channel POST begins as a writer
POST /api/videos/channels failed with "database is locked" on
`INSERT INTO collection` on the docker WROLPi while background workers
(config saves, refreshes) were writing.  The handler wrote through the
deferred request session: `create_channel` reads (the URL/name/directory
conflict check) and then INSERTs, and SQLite refuses that mid-transaction
lock upgrade instantly when another connection wrote in between --
busy_timeout is skipped for upgrades.

Same shape and same fix as POST /api/download (daf2ba39): the handler
now uses `get_db_session(commit=True)`, which begins IMMEDIATE so the
concurrent writer waits its turn, and which commits before the refresh
is fired so the refresh does not wait on a lock the request still holds.

The regression test commits a write from a second connection between
the handler's conflict check and its INSERT.  The existing
`write_lock_held_briefly` helper cannot reproduce this: the Sanic test
client takes over a second to start the app, so its lock is released
before the handler runs.  Before the fix the test fails with the
production error verbatim.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-15 14:03:27 -06:00
..
archive search: don't COUNT(*) OVER() the page query (#702) 2026-09-12 14:44:30 -06:00
docs docs: browse walks the file_group date index instead of probing every doc (#707) 2026-09-13 12:39:05 -06:00
flasher Flasher: chip-mismatch guard, WROLPi firmware table, colorblind chip colors 2026-07-02 17:26:37 -06:00
inventory Strip whitespace from inventory item string values on save 2026-07-30 17:34:46 -06:00
map Map previews that never drew, and a Docker map with no world under it (#658) 2026-08-11 20:37:23 -06:00
videos videos: channel POST begins as a writer 2026-09-15 14:03:27 -06:00
zim zim: recompute the outdated-Zims flag after startup and on Delete (#706) 2026-09-12 15:19:36 -06:00
__init__.py Move One-Time Pad encryption to the browser (#479) 2026-06-13 13:52:34 -06:00