-
-
Notifications
You must be signed in to change notification settings - Fork 624
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
Repro #956
Repro #956
Conversation
Thanks for the input. If I'm reading your log however, it works fine for you? I need it to demonstrate failure so I can find what is wrong. |
But this seems to stuck in the test case. What am I doing wrong?
@anacrolix Thank you very much for providing this test case! But I'm not sure what do you mean by "failure". There is no failure per se. The #953 issue is related to slow performance not failure. If you look at Although I'm not sure if the changes that I added in I've added another commit right now, which seems to be as closes to do what we are doing in our code.
When I make these changes, the test main.go seems to stuck. I'm unable to debug this? Can you please provide insights what am I doing wrong? Thanks |
Thanks! I'll take a look |
Well I spotted a masked bug in the webseed code. However that's not the issue. The things I fixed: You can't use file:// for a webseed URL. Spin up a HTTP server if you want to do that (do it in Go, in the repro, easy). You can't not seed the actual completed data if webseeding isn't available. You can't copy over the storage files while they're in use. You need to do it before the torrent's storage is active. At least one client needs to have the actual full metainfo. You can't get this over webseeding, you need to use the metainfo. |
Could you make the Go code reproduce this? I can't see anything wrong with your code at a glance, but it's not straightforward. |
Hi @anacrolix , Is there a client config which lets me change the download request size when downloading from web seed? Like suppose I want to request 1 MiB at a time from webseed? |
The webseeding code mirrors the regular code in the size of chunks it attempts. Look for "chunksize" in the client or torrent config. I know a few users set it very high (1MiB or so). There's no way to set it just for webseeding as webseeds and regular conns share the same request algorithm. |
Thanks, @anacrolix, for your test case! Using your testcase, once I set the optimal piece length, the torrent completed quickly. However, I have one question: suppose there is no seeder to begin with (another use case). My fallback is to contact the webseed to download the file. All the peers within the swarm contact the single webseed, but I was hoping they would also communicate among each other to distribute the pieces. However, it seems like this is not happening, as I don't see any activity under
When I switch to Libtorrent, I see that peers simultaneously download from the webseed and distribute pieces among themselves. Is there a way to achieve this in your torrent library? |
It looks like your peers are downloading in lockstep. If you look at their "x/y completed", they're all at the same value. They're sharing faster than it takes to request more pieces (I'm guessing they're on the same local network or host). The requested pieces field shows active requests. At the time the status was generated there are no active requests. If you look at "good chunks" that shows how many requests were satisfied from the peer since they last connected (and how many they uploaded to that same peer). |
Thanks for working through this, and the contribution! |
No description provided.