Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File not found after prioritizing a contiguous one from a previous session #7843

Open
YakoYakoYokuYoku opened this issue Feb 3, 2025 · 0 comments

Comments

@YakoYakoYokuYoku
Copy link
Contributor

Please provide the following information

libtorrent version (or branch): RC_2_0

platform/architecture: Linux 6.12.9

compiler and compiler version: Clang 19.1.7

Continuing testing my GStreamer BitTorrent streaming plugin I've noticed when prioritizing for only one torrent member to be downloaded, by setting lt::top_priority for that one and lt::dont_download for the rest, and saving its last piece to disk that if I try to download its next contiguous file in another session libtorrent will report that such file is not found because it only wrote to disk the prioritized bebmber. Said in another manner, downloading the last piece of a prioritized file which contains data from its adyacent will confound libtorrent into erroneously thinking that it has the piece in its entirety.

Such error doesn't happen all the times, it's a bit unpredictable but I've stumbled upon it.

I do have a pair of ideas on how to fix it, either libtorrent detects that the piece has been partially saved and downloads it again or it could write the remaining data into a special file which contains piece fragments. I'm inclined towards the latter to avoid redundant but the former has the advantage of rechecking things again for sanity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant