fix(files): review round 3, the server — a fetched locked re-read, a finish that follows its file, an eviction that counts again
- set_retention and delete_own re-read the folder under its lock and use that row (an unfetched ORM result never refreshes the object); a folder gone meanwhile is refused (409), and the route audits the retention actually replaced - a finishing download is stamped only while it is still in the folder (and keep) it was read with: a move or a folder delete landing meanwhile sends the read round again, so no file is done with no expiry - the eviction pass counts the disk before each candidate and skips one asked for since it began - docs: source builds get their own volume-copy snippet - race tests assert the lock wait; one built on a committing delete never raced
This commit is contained in:
+12
-2
@@ -279,8 +279,18 @@ that name. To move to the new layout, download the new
|
||||
Open the Files library and check your files play; only then remove the old volume
|
||||
(`docker volume rm "$OLD"`).
|
||||
- **If you build from source**, a `git pull` brings the new `docker-compose.yml`, whose default
|
||||
volume is `files` (it was `downloads`): copy it over the same way, with `downloads` and `files` in
|
||||
place of `siftlode_downloads` and `siftlode_files`, before you start the new version.
|
||||
volume is `files` (it was `downloads`). Copy it over before you start the new version — with your
|
||||
own compose file, not the self-host one above, whose volumes are other ones:
|
||||
|
||||
```bash
|
||||
docker compose down
|
||||
docker volume ls --format '{{.Name}}' | grep '_downloads$' # e.g. siftlode_downloads
|
||||
OLD=siftlode_downloads # the name it printed
|
||||
NEW="${OLD%downloads}files"
|
||||
docker volume create "$NEW"
|
||||
docker run --rm -v "$OLD":/from -v "$NEW":/to alpine cp -a /from/. /to/
|
||||
docker compose up -d --build
|
||||
```
|
||||
|
||||
If the files library is not mounted where the app looks, the API says so in its log at start
|
||||
(`The files library is not reachable`), and the download worker refuses to start rather than write
|
||||
|
||||
Reference in New Issue
Block a user