Open pvishnyakov opened 1 year ago
Hi,
1) This logic implements the bittorrent endgame mode as documented here: http://bittorrent.org/beps/bep_0003.html
I believe that this logic matches what libtorrent documents it does: https://github.com/steeve/libtorrent/blob/master/docs/settings.rst - see strict_end_game_mode.
It's puzzling to me that this reduces torrent performance. Roughly how fast are you downloading torrents (1 MB/s, 10MB/s, 100MB/s)? How many peers are you connected to? Does this affect performance only at the end of the torrent or for the whole download
2) I'm not familiar with this logic and don't have time to look into this.
I have no idea why it happens, seems that after "else" block deletion the pieces are distributed to more peers in parallel but I'm not sure. That's why I asked this question.
2 questions about the code that seems to be unnecessary or having strange logic affecting the download performance:
Assignment.java has this method:
What is the purpose of this part inside the "else" block?:
If I comment it all, download performance improved because the pieces are distributed between peers more evenly. Why this code is here?
Why do we need timeoutedPeers.remove(disconnectedPeer) here? It's allowing the timeouted peer to bypass the ban by disconnecting and re-connecting again, this behavior can be observed in the logs when the same peer is being disconnected due to slow piece downloading but re-appears just to be banned over and over again. Maybe it's better to keep the peer banned all the time until the ban lifted according to Config settings?