Commit Graph

1374 Commits

Author SHA1 Message Date
Matt Joiner 59d6b67c69 dht: Fix partial deadlock closing peer discovery 2014-12-20 13:02:12 +11:00
Matt Joiner e406d74ff0 Don't guess cap for some torrent fields, need to minimize memory use 2014-12-20 13:00:21 +11:00
Matt Joiner db749b89db dht-get-peers: Don't bother to close the server before quitting
The closing code isn't very clean yet, and it's unnecessary.
2014-12-20 10:11:34 +11:00
Matt Joiner dbf72c1033 dht: Some peer sent me a bad info_hash 2014-12-20 10:10:53 +11:00
Matt Joiner ec47c4f4dc dht: Use a bloom filter to track contacted nodes during peer discovery 2014-12-20 10:10:22 +11:00
Matt Joiner 20d4549430 dht: Use both bootstrap addrs, as they seem to take turns going down 2014-12-20 10:09:11 +11:00
Matt Joiner e6c93455b5 Add some tools for analysing bloom filter use 2014-12-20 10:07:41 +11:00
Matt Joiner 8d87bb83a6 Refine connection status flags 2014-12-09 00:26:06 -06:00
Matt Joiner b52f866e90 dht: We can now message nodes with no ID if there's nothing better 2014-12-09 00:25:49 -06:00
Matt Joiner b2dd026793 Update TODO 2014-12-09 00:24:57 -06:00
Matt Joiner f513772f1f dht: Slow down the start a little, as lots of torrents will hammer out UDP packets 2014-12-09 00:24:05 -06:00
Matt Joiner 262f045fd1 Fixes due to not pending chunk specs prematurely 2014-12-09 00:22:05 -06:00
Matt Joiner 998d85ba50 :) 2014-12-08 21:59:01 -06:00
Matt Joiner 48582796ed Add pending peers high water mark to stop excessively long running DHT queries 2014-12-08 21:58:49 -06:00
Matt Joiner fa501ed06a dht: Limit the size of peer discovery backlog 2014-12-08 21:57:53 -06:00
Matt Joiner a081ad63d9 Save memory by not pending chunks prematurely 2014-12-08 21:57:13 -06:00
Matt Joiner e926a8d65c dht: During get_peers, put discovered nodes in a backlog for later querying 2014-12-08 20:00:42 -06:00
Matt Joiner d1bcb272bc dht: A few minor improvements 2014-12-08 19:14:10 -06:00
Matt Joiner 78eb25535d dht: Cap nodes to 10k, drop nodes that timeout if we're out of space 2014-12-08 19:09:11 -06:00
Matt Joiner 4be7b11a3b Use bitbucket.org/anacrolix/sync 2014-12-08 17:00:38 -06:00
Matt Joiner ac57158982 dht: Store transactions by key, and fix partial deadlock 2014-12-08 16:59:25 -06:00
Matt Joiner d9793a78ba Improve announce logging 2014-12-08 16:57:42 -06:00
Matt Joiner c6d41cf027 dht: Tidy up GetPeers() 2014-12-06 21:22:12 -06:00
Matt Joiner 35ba3c44e1 dht: Retry queries twice before timing out 2014-12-06 21:21:20 -06:00
Matt Joiner 1e3a00979d Fix UTP still listening despite attempting to temporarily disable it 2014-12-06 21:19:56 -06:00
Matt Joiner 51306ccbb2 Expose various DHT state 2014-12-06 21:19:02 -06:00
Matt Joiner a4dc96bb12 Make some overlap of piece priorities
The goal is to reduce duplicating requests on higher priority pieces.
2014-12-06 21:18:17 -06:00
Matt Joiner bacb1af357 Write piece status as counts of contiguous identical states 2014-12-06 21:16:02 -06:00
Matt Joiner 9be0f6463f internal/pieceordering: Switch to a different skiplist implementation 2014-12-06 21:15:03 -06:00
Matt Joiner 3c41002317 Set a low water mark for replenishing requests 2014-12-05 00:58:43 -06:00
Matt Joiner d58ca65a9c pieceordering: Rename RemovePiece->DeletePiece and complete tests
Note that tests currently fail due to bug in skiplist?
2014-12-05 00:58:04 -06:00
Matt Joiner 65ccc9c75e Forgot to commit this part of fixing disable TCP dialing out 2014-12-05 00:56:51 -06:00
Matt Joiner b6ae4caa6a Set priorities ahead of the current read position 2014-12-05 00:56:28 -06:00
Matt Joiner ac1afa19b8 mmap_span: Avoid allocating the span slice on every use 2014-12-05 00:54:55 -06:00
Matt Joiner f050bc02f7 Disabling TCP didn't include dialing out, also always disable UTP until the package is fixed 2014-12-05 00:53:26 -06:00
Matt Joiner 7b46b41011 Switch back to using the UTP redesign 2014-12-03 19:58:02 -06:00
Matt Joiner 7ba25ce936 A probably unhelpful test that ensures UTP performs 2014-12-03 19:57:43 -06:00
Matt Joiner 7b80153387 fs: Improve tests 2014-12-03 12:53:10 -06:00
Matt Joiner 3f44ed8c43 Improve fs/unwedge tests 2014-12-03 12:52:08 -06:00
Matt Joiner ba1367536c tracker/udp: Tidy up tests 2014-12-03 12:51:49 -06:00
Matt Joiner 51f5273ba9 util/dirwatch: Some tidying 2014-12-03 12:10:29 -06:00
Matt Joiner 948de5629b dht: Seemed to be wasting a lot of memory here 2014-12-03 01:08:18 -06:00
Matt Joiner 91c2c1f5c7 Piece priorities, torrent read interface and many fixes 2014-12-03 01:07:50 -06:00
Matt Joiner ea88bad291 dht: Don't log messages that have been truncated 2014-12-02 18:43:28 -06:00
Matt Joiner 98400ab9c7 Harmless shortcut initing peer pieces when we have the torrent info 2014-12-02 18:43:05 -06:00
Matt Joiner a87e753572 When metadata arrives, we also need to init request ordering 2014-12-02 18:42:22 -06:00
Matt Joiner 9fac3e8f33 Remove commented out code 2014-12-02 18:23:07 -06:00
Matt Joiner 7228e40c95 Add piece ordering per-connection piece request priority 2014-12-02 18:22:38 -06:00
Matt Joiner d2f8114154 dht: Receiving UDP source port 0 isn't an error apparently 2014-12-02 14:55:41 -06:00
Matt Joiner b1ac38a617 iplist: Double performance of parsing line 2014-12-02 14:55:06 -06:00