Weaver 0.17.7 release notes
Everything below is new since 0.17.6.
Highlights
- PAR2 and PAR3 repair by columns. A job that loses articles can now
be repaired with fewer recovery blocks than it has damaged slices.
Some jobs that failed before now complete. - Faster checks on SSDs. PAR2 and PAR3 check a set's files side by
side on flash storage. - PAR2 sets with a BLAKE3 index keep it and use it to check recovery
blocks. - One memory plan. Weaver's memory limits now fit together under the
process's memory, so small containers are not killed for memory. completedFileslists the files a finished job delivered whole.- Older Sonarr and Radarr connect to the qBittorrent facade again.
- A job no longer sticks in Verifying when a queue script is set.
Repair by columns
What changed
PAR2 and PAR3 split each file into slices (PAR3 calls them blocks) of
the same size. Until now, Weaver treated a slice as lost if any byte of
it was lost, and needed one recovery block for each lost slice.
The recovery maths does not need that. It works on each byte position
(a column) of the slice on its own. A recovery block can rebuild one
lost slice at every column. So what a repair needs is the largest number
of slices damaged at any one column, not the number of slices damaged.
Weaver knows exactly which bytes are missing: the bytes of the articles
that never came or failed their checksum. It now passes those ranges to
the repair, not whole slices.
An example
A file is posted in 700 KiB articles and its PAR2 set uses 1 MiB slices,
so articles do not line up with slices. Two articles are lost. Each
crosses a slice boundary, so each damages the end of one slice and the
start of the next.
- Before: four damaged slices, so four recovery blocks. With two blocks
in the set, the job failed. - Now: no column is damaged in more than two of those slices, so two
blocks rebuild all four. The job completes.
This case is common, because posters rarely align article size to slice
size.
How Weaver chooses
- Columns or whole slices. The repair library prices both plans.
Weaver repairs by columns unless whole slices cost no more and enough
blocks are held for them. - Waiting for blocks. A job waits only for as many recovery blocks
as the plan it will use needs. A set is called not repairable only
when the column plan cannot work either. - Nothing is written unless it checks. A column repair writes only
when every rebuilt slice passes its checksum. If one fails, or a file
has damage the lost articles did not explain, Weaver repairs whole
slices as before. - Missing bytes read as zeros when a damaged slice is read for its
check. - PAR3. The same applies. A file that changed since the plan was made
is planned again. A recovery block that does not authenticate is left
out and another is used in its place.
PAR2 and PAR3
- Checking files side by side on flash. On SSD and NVMe, a set's
files are checked at the same time, one per repair thread, within the
job's memory grant. Spinning, network and unknown storage keep one file
at a time, in order, with readahead. Both reach the same results. - Fewer reads. After a repair, only slices whose state is not already
known are read back. Slices known to be damaged are not read. - PAR3 reads recovery data only when a repair uses it. A clean check
reads only packet headers. A large recovery packet is hashed in bounded
reads instead of held whole. - PAR3 hashing is spread across the repair threads.
- BLAKE3 index. Some PAR2 sets carry an extra packet with BLAKE3
digests of each slice. Weaver keeps it, checks it against the set's own
MD5 checksums, then uses it to check recovery blocks. A recovery block
the index does not describe is not used. Sets without it are checked by
MD5 as before. - Bounded memory. A repair's check, the slices it keeps and the
rebuild stay inside its memory grant. The verify thread count follows
the grant, so a small grant means fewer threads, not one. weaver par2 verifyandweaver par2 repairpick their read
strategy from the storage: readahead on spinning disks, positioned reads
elsewhere.- Large sets. Work that grew with the square of a file's slices or
failed reads is now done with a lookup, with the same results.
Other changes
completedFiles(jobId, first, after)returns a page of the files a
finished job delivered whole, in path order. A complete job lists every
file, a partial one the whole files only, a failed one none. A torrent
lists its own files. Pages default to 1000 files, at most 5000. It
returns null for a partial job finished before this release, because
Weaver did not record which of its files were whole.- Docker Desktop on macOS. A shared folder reports the Mac's main disk
free space, whatever disk it is on. Weaver now says so under the storage
figures and incapacityCaveat(DOCKER_DESKTOP_FILE_SHARE). - qBittorrent facade.
auth/loginanswers 200 withOk.orFails.,
as Sonarr before 4.0.17 and older Radarr expect.torrents/pauseand
torrents/resumeare accepted.torrents/deletewithoutdeleteFiles
keeps the data, andtorrents/setShareLimitsno longer needs
inactiveSeedingTimeLimit. - SSH keys. SSH tunnels take ML-DSA (
ssh-mldsa44-ed25519) keys as
well as Ed25519. - Quieter logs. Repeating lines are limited to a bounded rate, and
per-article warnings are shown once a minute per job and kind.
Fixes
- Memory on small machines. Weaver's memory limits were sized one at
a time and together could claim most of a container's memory. They now
shrink together until they fit in half of it. Machines where they
already fit keep every value. - A job stuck in Verifying. With any queue script set, a job with
recovery files could stay in Verifying for good. - A tunnel that stops no longer counts against a usenet server. Its
connections failing could quarantine a healthy server. - Slow disk warnings. A disk was reported slow while its buffer held
articles still downloading. It is now slow only when downloaded data
waits for it. - Tunnels and legs.
- Revoking a leg now ends everything it handed out: accepted
connections, bound UDP sockets and listeners. - Torrent UDP sockets in a tunnel bind again when the tunnel is
replaced. - The DHT, uTP and UDP tracker readers keep going after a read error,
and rest instead of spinning. They stop only on a closed socket. - A send error on a tunnel's torrent socket loses one packet, not the
socket. - Two sessions can no longer bring up the same WireGuard key at once.
- A SOCKS5 proxy that goes silent under UDP is noticed within about 30
seconds, and
one that keeps ending its UDP association is retried with a growing
pause. - A WireGuard tunnel's oversized datagram is dropped instead of failing
the receive. - Kept DNS over TLS and HTTPS connections survive while their session
stays up.
- Revoking a leg now ends everything it handed out: accepted
- NAT-PMP. A failed renewal keeps the forwarded port while its lease
lasts, so trackers are not told two port changes. The next request asks
for the same port, and is retried from five seconds. A lease is
withdrawn when its lifetime runs out. - A torrent that ends a run serves no more blocks from it.
- The UDP tracker retry wait is no longer cut short in conversion.
- History. Finding a job's incomplete files is done in batches, and
removing many torrents reads what they made in one batch.
API changes
- New:
completedFiles,CompletedFile,CompletedFilesPage, and
capacityCaveaton theconfiguredStorageandpathStorage
results.
Upgrade notes
- Migration 141 runs automatically on SQLite and Postgres. It adds the
tables that record each finished job's incomplete and completed files.
Dependencies
- Archive and repair: par2-rs 0.15.0 (with BLAKE3), par3-rs 0.9.0,
reedsolomon-rs 0.6.0, unrar-rs 0.16.11 and sevenz-turbo 0.31.2. - Networking: proxy-tunnels 0.8.4 and russh 0.66.0.
- Other: notify 9.0.0, windows and windows-sys 0.101, and
blake3-scryer-media for backup and NZB checksums.
Tests
- Column repair cases in unit, pipeline and e2e tests, including a job
that completes only by repairing columns. - Memory profiles grant each repair the workspace its plan fitted, and
both PAR engines work in it.