fix[notask]: drain in-flight blob blocks before cleanup - #3496
Conversation
88ff407 to
058671d
Compare
Review StatusCurrent Status: ✅ APPROVED |
There was a problem hiding this comment.
I checked this against the current head and the installed Hypercore implementation. peer.inflight tracks outstanding requests, while peer.dataProcessing stays nonzero across the async verify/store portion of data handling, so waiting on both covers the persistence window this fix targets.
Local verification:
- full client unit suite: 35/35 tests, 132/132 assertions
- real Corestore/Hyperblobs storage regression: 25/25 repeated runs
- typecheck and formatting: pass
- lint: pass (only the existing
require-awaitwarnings in test stubs)
The storage test is particularly useful here: it confirms blocks arrive after cancellation and that zero blocks remain after reopening the Corestore. I did not find a functional issue in the destroy -> drain -> clear/compact ordering. The 5-second path remains intentionally best-effort, but the warning makes that operationally visible.
There was a problem hiding this comment.
right idea — drain peer.inflight/dataProcessing before clear, and the real Corestore reopen test is doing the heavy lifting. ran client.download-retry + client.download-storage locally: 16/16 pass.
rebase onto main first (conflicts with #3513 format pass). validate-pr is red until someone puts verified on this fork PR — https://github.com/tetherto/qvac/actions/runs/30363879302/job/90290162427
|
Follow-up/correction to my earlier review after reading the new comments against the installed Hypercore implementation: my “no functional issue” conclusion was too broad. The timeout objection is valid. I could not reproduce the same concern for For the timeout path, a fixed “clear, short wait, clear” is not sufficient unless the second clear is after |
058671d to
dc3a7f4
Compare
|
Closing in favor of #3582, which carries the same change from an upstream |
What problem does this PR solve?
Cancelled registry downloads can still persist Hypercore blocks after the range request is destroyed. Responses already in flight may arrive between
destroy()andclear(), so the cache continues growing across distinct cancellations.How does it solve it?
inflight/dataProcessingcounters and still clears (best-effort).core.verifysodataProcessingstays nonzero past the drain deadline, plus a focused unit coverage of the timeout log payload.Breaking changes
None.