sniff: keep only complete pieces in the probe completion #30

Merged
mikluko merged 1 commit from probe-complete-only into main 2026-11-25 16:46:12 +00:00
Owner

A new probe torrent has no completion, so anacrolix/torrent queued an initial check of every piece; each failed on the missing file and wrote "incomplete" in its own bolt transaction, and dropSeed deleted them all again. That was a fifth of a probe node's CPU (MarkNotComplete 21% in a 30 s profile of sniffarr-probe-0), with the bolt freelist growing. An absent record now means known incomplete.

BenchmarkProbeCompletion, one probe of 8192 pieces, 16 downloaded, on bolt: 473 ms → 12 ms.

Not covered by a test: pieces surviving a restart of a seeded torrent.

🤖 Generated with Claude Code

A new probe torrent has no completion, so anacrolix/torrent queued an initial check of every piece; each failed on the missing file and wrote "incomplete" in its own bolt transaction, and dropSeed deleted them all again. That was a fifth of a probe node's CPU (`MarkNotComplete` 21% in a 30 s profile of sniffarr-probe-0), with the bolt freelist growing. An absent record now means known incomplete. `BenchmarkProbeCompletion`, one probe of 8192 pieces, 16 downloaded, on bolt: 473 ms → 12 ms. Not covered by a test: pieces surviving a restart of a seeded torrent. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
sniff: keep only complete pieces in the probe completion
All checks were successful
CI / changelog (pull_request) Successful in 4s
Build / packages (pull_request) Successful in 1m32s
CI / test (pull_request) Successful in 1m49s
Build / image (pull_request) Successful in 49s
Build / chart (pull_request) Successful in 5s
dad4672e5e
A new probe torrent has no completion, so anacrolix/torrent queued an
initial check of every piece; each failed on the missing file and wrote
"incomplete" in its own bolt transaction, and dropSeed deleted them all
again. That was a fifth of a probe node's CPU, with the bolt freelist
growing. An absent record now means known incomplete.

Assisted-by: Claude Code (claude-opus-5-5)
CHANGELOG.md: shorten the probe completion entry
All checks were successful
CI / changelog (pull_request) Successful in 5s
Build / packages (pull_request) Successful in 2m20s
CI / test (pull_request) Successful in 2m41s
Build / image (pull_request) Successful in 32s
Build / chart (pull_request) Successful in 4s
49aa1d8056
Assisted-by: Claude Code (claude-opus-5-5)
mikluko force-pushed probe-complete-only from 49aa1d8056
All checks were successful
CI / changelog (pull_request) Successful in 5s
Build / packages (pull_request) Successful in 2m20s
CI / test (pull_request) Successful in 2m41s
Build / image (pull_request) Successful in 32s
Build / chart (pull_request) Successful in 4s
to 5e9304e2f8
All checks were successful
CI / changelog (pull_request) Successful in 7s
Build / packages (pull_request) Successful in 2m46s
Build / image (pull_request) Successful in 27s
CI / test (pull_request) Successful in 2m49s
Build / chart (pull_request) Successful in 4s
2026-11-25 16:33:17 +00:00
Compare
mikluko deleted branch probe-complete-only 2026-11-25 16:46:12 +00:00
Sign in to join this conversation.
No description provided.