Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions src/content/docs/v1/configuration/repairs.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,17 +147,23 @@ health checks.

### Recent-read hold <a class="since" href="https://github.com/infinidysk/infinidysk/releases/tag/v1.6.3">since 1.6.3</a> {#recent-read-hold}

**Defer Removal After Reads** (`repair.read-hold-minutes`, default `15`, range `0`–`1440`) keeps a
file available while it is being played. Before any automatic removal or replacement, infinidysk
checks when the file was last read through WebDAV or the in-app player. If that read is more recent
than the hold, the removal waits and the file is shown as **Action needed** until the hold expires.
Each new read renews the deadline. Every path that points at the same library file (for example
`/content` and `/.ids` aliases) shares one hold.

- PAR2 reconstruction still runs first; the hold only delays removal and replacement.
- Urgent repairs keep their urgent status while held and resume as urgent once the hold expires.
- The same hold protects removals found by routine background health checks.
- Set `0` to restore removal in the next repair slot, as in earlier releases.
**Defer Removal After Reads** (`repair.read-hold-minutes`, default `15`, range `0`–`1440`)
retains a recently read file when the need for replacement is still uncertain. Reads through
`/content`, `/.ids` and other paths resolving the same file share that timestamp.

When damage is confirmed and the file still needs replacement after PAR2 recovery, a recent
completed or failed read no longer delays replacement. Transient provider errors and open
circuits do not establish permanent damage. Repair windows and replacement-loop limits still apply.

An actual WebDAV or in-app GET request protects its file until the request closes, including
requests stalled without progress. Overlapping readers must all finish before removal can
proceed. A file held for an active reader stays urgent and becomes eligible shortly after the
last reader closes; the full recent-read timer is not restarted for confirmed damage.

- PAR2 reconstruction still runs first; these holds only delay removal and replacement.
- Unconfirmed urgent repairs retain their priority while the recent-read hold runs.
- The same active-reader protection applies to routine health checks.
- Set `0` to disable the recent-read timer; active GET requests remain protected.
- Set it with `NZBDAV_CONFIG__REPAIR__READ_HOLD_MINUTES` for headless installs.

Limits:
Expand Down
19 changes: 19 additions & 0 deletions src/content/docs/v1/operations/health-repairs.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,25 @@ a WebDAV read that would have failed with `404 Not Found` returns `503 Service U
`Retry-After` instead, and a gap in the middle of a file is filled for that read only. Neither case
schedules a repair or records the segment as missing.

### Replacing files without original grab history

For older or migrated library files, infinidysk first tries to recover the original download
identity from Arr history matching the current file ID and organized path. This lets recovery
use the original grab record instead of guessing from a migration identifier.

When a damaged file matches an exact Arr library file and a stored or uniquely recovered
download ID, but Arr no longer has its original grab record, infinidysk removes the damaged
file and requests a replacement search without blocklisting. Health history states that
blocklisting was skipped; the regrab record does not claim the release was blocklisted.

Active-reader protection, the repair schedule and replacement-loop limits still apply.
Confirmed damage requiring replacement can bypass the recent-read timer after the last active
read closes; see [Recent-read hold](/v1/configuration/repairs/#recent-read-hold). Arr can
select the same release again when it has not been blocklisted. Uncertain ownership,
ambiguous import history and unproven legacy download IDs remain deferred. If the file
changes during the history lookup, infinidysk leaves the replacement alone. If removal
succeeds but the search cannot be confirmed, the result remains **Action needed**.

### When files are rechecked

After a successful health check, infinidysk schedules the next routine check after an
Expand Down