30 lines
1.8 KiB
Markdown
30 lines
1.8 KiB
Markdown
# Rsync preflight Scanner failure
|
|
|
|
Rsync `--info=progress2` updates can be separated by carriage returns rather than
|
|
newlines. Estimate previously used Scanner's default ScanLines, so enough
|
|
updates formed a token larger than its configured 2 MiB maximum. The preflight
|
|
then correctly refused to proceed with an unknown estimate, but users could
|
|
mistake the error for insufficient destination capacity.
|
|
|
|
Estimate now shares the copy runner's CR/LF-aware streaming parser. The common
|
|
parser returns read errors and drains the remaining pipe after a parse failure,
|
|
preventing a blocked producer. Run now propagates these errors instead of
|
|
silently returning a potentially incomplete summary. The token bound remains
|
|
2 MiB; free-space checks and deletion/overwrite settings are unchanged.
|
|
|
|
Synthetic regression: 100,000 CR-delimited progress updates followed by zero-file
|
|
summary statistics. The previous source fails with `SpaceUnknown: bufio.Scanner:
|
|
token too long`; the fixed source returns a known zero-byte estimate. Additional
|
|
tests cover mixed CR/LF with an unterminated final line and oversized-token error
|
|
reporting/draining. Existing real-rsync tests use temporary synthetic files only.
|
|
No production backup data, configuration or logs were inspected or replayed.
|
|
|
|
Validation: all Go packages passed on Linux with Go 1.27.2 and system rsync;
|
|
`go vet ./...`, shell syntax, migration fixture and JavaScript syntax passed.
|
|
An initial full run exposed an unrelated intermittent Restic BackupImage summary
|
|
test failure; that test passed three immediate repeats and the full rerun.
|
|
This change does not fix or claim to resolve that separate Restic behavior.
|
|
|
|
Release 2026.10.15.r001 contains the fix. Publishing an update does not validate
|
|
available capacity for a real job; the next real preflight still must succeed.
|