-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Comments
I don't quite understand all the specifics of this issue. Let's say you have a torrent with 2 files, A and B. You download A and set B to Your statement first states that the last piece has been downloaded, then you suggest that it hasn't been downloaded "in its entirety". Which one is it? pieces can only be verified against the piece hash if the whole piece has been downloaded. I think the next step in trouble shooting is to understand whether file B exists on disk or not. If it doesn't, do you have a part-file? (typically named by the info-hash and If you save resume data, in and |
Errata, this feature is already present in the form of part files. An oversight from my side.
I think that the portion of
Maybe I wasn't that clear on that. I've referred to download as fetching the piece and writing it into a corresponding file. And again, what I wrote was because I've forgot that
That makes me think, does libtorrent use the part file when you change said priorities? I've assumed that
My plugin uses resume data for convenience. Though, priorities have to be changed when I select another torrent member because said plugin works on a single file as of now. If that changes the way the part file is read then I wasn't aware of that. |
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 andlt::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.
The text was updated successfully, but these errors were encountered: