wrolpi/wrolpi/files
Roland 68c6da5042
Renaming a directory with Collections waits for a concurrent writer
POST /api/files/rename on a directory changed Collections on the request's
deferred transaction.  For a plain directory, that transaction was opened
before the FileWorker moved the files and wrote only after, so if anything
else wrote meanwhile the Collection update failed ("database is locked"):
the request returned 409 with the files already moved, and the nested
Collections still pointed at the old directory.  Renaming a Collection's
own directory failed the same way, before moving anything.

rename_directory now changes Collections in a `write` (request.ctx.db.write
from the endpoint), which begins as a writer.  Files are moved outside it;
nested Collections are read inside it, after the move.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 14:35:26 -06:00
..
test Renaming a directory with Collections waits for a concurrent writer 2026-10-23 14:35:26 -06:00
__init__.py Add Docs module for searching and organizing PDFs and EPUBs 2026-03-20 14:17:06 -06:00
api.py Renaming a directory with Collections waits for a concurrent writer 2026-10-23 14:35:26 -06:00
downloader.py Downloads and uploads: don't read ORM objects after their session is gone (#812) 2026-10-10 19:41:04 -06:00
indexers.py Preview markdown files formatted, with a raw toggle (#780) 2026-10-05 13:26:42 -06:00
lib.py Renaming a directory with Collections waits for a concurrent writer 2026-10-23 14:35:26 -06:00
modeler.py Upgrade to SQLAlchemy 2.0 (synchronous) (#803) 2026-10-09 15:08:40 -06:00
models.py Remove a file's Tags Directory links when WROLPi deletes it (#861) 2026-10-23 14:34:51 -06:00
move.py Add a Repos module that mirrors git repositories (#783) 2026-10-07 15:16:58 -06:00
progress.py Track how far the user is through a file, kept in recently_viewed.yaml (#787) 2026-10-08 16:15:25 -06:00
refresh.py files: extract refresh compare into its own module; drop file_group.idempotency (#717) 2026-09-20 20:58:19 -06:00
reorganize_job.py files: split FileWorker move and reorganize into mixins (#719) 2026-09-24 14:17:42 -06:00
schema.py Resume videos and audio where the user left off; show progress on cards (#791) 2026-10-08 17:29:22 -06:00
worker.py Refresh keeps a duplicate FileGroup's tags when collapsing duplicates (#859) 2026-10-23 12:33:11 -06:00