]>
Sergey Matveev's repositories - btrtrc.git/log
Matt Joiner [Sun, 10 Jul 2016 13:03:59 +0000 (23:03 +1000)]
Fix issue #96
In the native file-based storage, mark pieces incomplete if the necessary file data is missing, or there's a read error on a piece.
Matt Joiner [Sun, 10 Jul 2016 13:01:17 +0000 (23:01 +1000)]
Improve the log message when piece reads fail
Matt Joiner [Sun, 10 Jul 2016 13:00:52 +0000 (23:00 +1000)]
Piece offset computed incorrectly in Reader.readOnceAt
Possibly it was only wrong on the last piece in rare circumstances.
Matt Joiner [Sun, 10 Jul 2016 12:58:43 +0000 (22:58 +1000)]
Skeleton TestMain
Used with manual inspection of process after tests finish.
Matt Joiner [Sun, 10 Jul 2016 05:01:08 +0000 (15:01 +1000)]
Rework the client transfer test to allow non-piece-based leecher storage
In preparation for tests for data going missing for the file-based storages. Issue #96
Matt Joiner [Sun, 10 Jul 2016 04:00:25 +0000 (14:00 +1000)]
Bring back log message when a piece read fails unexpectedly
Matt Joiner [Fri, 8 Jul 2016 14:36:53 +0000 (00:36 +1000)]
Move issue #95 tests into their own file
Matt Joiner [Fri, 8 Jul 2016 14:36:32 +0000 (00:36 +1000)]
Fix issue #95: Closing torrent storage also closed client storage for some storage types
Matt Joiner [Fri, 8 Jul 2016 14:28:12 +0000 (00:28 +1000)]
Add a test for issue #95
Matt Joiner [Fri, 8 Jul 2016 14:12:32 +0000 (00:12 +1000)]
metainfo: Move method in wrong file
Matt Joiner [Thu, 7 Jul 2016 09:40:26 +0000 (19:40 +1000)]
metainfo.Info.BuildFromFilePath: Ensure stable file ordering
Spotted by @axet, with precedent in Transmission.
Matt Joiner [Thu, 7 Jul 2016 04:49:18 +0000 (14:49 +1000)]
Solve the mystery bug with TestMaxEstablishedConns
Adding Torrent by infohash wasn't triggering connections to be accepted, when both TCP and uTP were enabled.
Matt Joiner [Thu, 7 Jul 2016 04:16:06 +0000 (14:16 +1000)]
Revert "Revert "TestSetMaxEstablishedConn does now work with utp""
This reverts commit
9b3869f3c53e65d0c42527c76504c14bdff068be .
Matt Joiner [Thu, 7 Jul 2016 04:14:59 +0000 (14:14 +1000)]
missinggo.Sort->SortSlice
Matt Joiner [Wed, 6 Jul 2016 04:05:03 +0000 (14:05 +1000)]
Revert "TestSetMaxEstablishedConn does now work with utp"
This reverts commit
eb1be48cc6431cb380abbe11af6e72bbcec47b06 .
Matt Joiner [Wed, 6 Jul 2016 04:03:11 +0000 (14:03 +1000)]
Improve logging heuristic for sending chunks of pieces that go missing
Matt Joiner [Wed, 6 Jul 2016 04:02:15 +0000 (14:02 +1000)]
mmap storage: Close pieceCompletion on Close
Matt Joiner [Wed, 6 Jul 2016 03:38:16 +0000 (13:38 +1000)]
storage: Move pieceCompletion interface into correct file
Matt Joiner [Wed, 6 Jul 2016 01:05:04 +0000 (11:05 +1000)]
TestSetMaxEstablishedConn does now work with utp
I think dialing out from a utp.Socket before its reader has initialized may be the cause. Either way moving the addPeers to after all the Clients are initialized has worked around it as a side effect.
Matt Joiner [Tue, 5 Jul 2016 22:31:30 +0000 (08:31 +1000)]
Use addClientPeer helper in tests
Matt Joiner [Tue, 5 Jul 2016 22:30:34 +0000 (08:30 +1000)]
Add more thorough tests for Torrent.SetMaxEstablishedConns
Matt Joiner [Tue, 5 Jul 2016 14:42:16 +0000 (00:42 +1000)]
Add Torrent.SetMaxEstablishedConns
Matt Joiner [Tue, 5 Jul 2016 14:38:43 +0000 (00:38 +1000)]
Rework locking in Client.acceptConnections
Matt Joiner [Tue, 5 Jul 2016 06:23:17 +0000 (16:23 +1000)]
Prepare to allow max conns per torrent to be configured
Matt Joiner [Tue, 5 Jul 2016 05:52:33 +0000 (15:52 +1000)]
Add counters for uploads
Fixes #71.
Matt Joiner [Mon, 27 Jun 2016 05:46:43 +0000 (15:46 +1000)]
Remove redundant check in Torrent.SetInfoBytes
Matt Joiner [Mon, 27 Jun 2016 05:46:27 +0000 (15:46 +1000)]
Throw away Torrent display name when info becomes available
Matt Joiner [Mon, 27 Jun 2016 05:45:15 +0000 (15:45 +1000)]
Fix crash causing deadlock in connection writer when no messages have been posted yet
Matt Joiner [Mon, 20 Jun 2016 16:35:53 +0000 (02:35 +1000)]
Add metainfo.NewHashFromHex
Matt Joiner [Mon, 20 Jun 2016 08:21:16 +0000 (18:21 +1000)]
storage: Remove debug log
Matt Joiner [Mon, 20 Jun 2016 08:20:59 +0000 (18:20 +1000)]
storage: Also use completion DB in mmap implementation
Matt Joiner [Mon, 20 Jun 2016 07:51:40 +0000 (17:51 +1000)]
Track closing of outbound TCP connections
Got all inbound and outbound UTP, missed this one I think.
Matt Joiner [Mon, 20 Jun 2016 07:51:05 +0000 (17:51 +1000)]
Add piece completion storage
Toward fixing https://github.com/anacrolix/torrent/issues/50.
Matt Joiner [Mon, 20 Jun 2016 06:11:43 +0000 (16:11 +1000)]
storage.MMapTorrent should not be exported
Matt Joiner [Sat, 18 Jun 2016 07:23:53 +0000 (17:23 +1000)]
Suppress tracker scraping errors until I decide what to do with them
They're not really necessary, but I had them enabled while I rewrote the tracker scraper code.
Matt Joiner [Sat, 18 Jun 2016 06:02:59 +0000 (16:02 +1000)]
cmd/torrent: Remove unused "short" tag
Matt Joiner [Thu, 16 Jun 2016 02:27:49 +0000 (12:27 +1000)]
cmd/torrent-create: Improve spelling and descriptions
Alexey Kuznetsov [Wed, 15 Jun 2016 15:25:48 +0000 (18:25 +0300)]
-a option (#86)
* add -a option
* name
Matt Joiner [Wed, 15 Jun 2016 05:29:47 +0000 (15:29 +1000)]
Move a few methods to Torrent, and track how many DHT announces occur
I suspect that DHT announces may occur too regularly, or without a break for torrents that aren't able to get over the lower water pending peer mark.
Matt Joiner [Wed, 15 Jun 2016 05:13:53 +0000 (15:13 +1000)]
Client.announceTorrentDHT -> Torrent.announceDHT
Matt Joiner [Wed, 15 Jun 2016 05:09:34 +0000 (15:09 +1000)]
bencode.Encoder: Unembed the Writer and wrap it in a minimal interface
I won't remove the bufio.Buffer for Marshal now, it isn't a performance issue as far as I can tell, and I'd have to fake Flush().
Matt Joiner [Wed, 15 Jun 2016 05:00:51 +0000 (15:00 +1000)]
bencode: Remove private types encoder and decoder
Instead the functionality is exposed directly on the public types.
Matt Joiner [Wed, 15 Jun 2016 04:54:40 +0000 (14:54 +1000)]
bencode.Unmarshal: Remove unnecessary intermediate bufio.Reader
Matt Joiner [Wed, 15 Jun 2016 04:51:58 +0000 (14:51 +1000)]
bencode: Unembed the Reader type, and minimize the interface surface
Want to remove some unnecessary allocations.
Matt Joiner [Wed, 1 Jun 2016 12:44:22 +0000 (22:44 +1000)]
README: Improve the cmd/torrent doc
Matt Joiner [Wed, 1 Jun 2016 02:12:38 +0000 (12:12 +1000)]
Merge pull request #84 from gdouezangrard/master
fix disabling of global bootstrap servers for announce when the node table is empty
Guillaume Douézan-Grard [Wed, 1 Jun 2016 01:02:21 +0000 (03:02 +0200)]
fix bootstrap from global servers disabling
Matt Joiner [Sat, 28 May 2016 12:04:33 +0000 (22:04 +1000)]
Reduce the impact of preferring earlier pieces
I think urgent pieces at the end of a torrent were getting fairly starved.
Matt Joiner [Tue, 24 May 2016 09:46:24 +0000 (19:46 +1000)]
Improve the logic for which address to use for DHT
Matt Joiner [Tue, 24 May 2016 09:45:42 +0000 (19:45 +1000)]
Tidy up the listen function
Matt Joiner [Tue, 24 May 2016 09:35:23 +0000 (19:35 +1000)]
Add tests for #81
Matt Joiner [Tue, 24 May 2016 09:09:57 +0000 (19:09 +1000)]
Merge pull request #81 from lovedboy/master
fix listenedAddr bug when TCP or UDP bind dynamic port
lovedboy [Tue, 24 May 2016 05:24:29 +0000 (13:24 +0800)]
add return when utpsock's err is not nil
lovedboy [Tue, 24 May 2016 05:19:55 +0000 (13:19 +0800)]
Merge branch 'master' of https://github.com/lovedboy/torrent
lovedboy [Tue, 24 May 2016 05:18:04 +0000 (13:18 +0800)]
listenedAddr fix when TCP or UDP bind dynamic port
Matt Joiner [Mon, 23 May 2016 16:09:47 +0000 (02:09 +1000)]
Ban IPs that contribute to failed piece checks
Matt Joiner [Mon, 23 May 2016 10:08:18 +0000 (20:08 +1000)]
Torrent.MetaInfo: don't crash if info isn't available yet
Matt Joiner [Mon, 23 May 2016 01:11:56 +0000 (11:11 +1000)]
Update Torrent.wantPeersEvent when info is obtained
Matt Joiner [Mon, 23 May 2016 01:00:49 +0000 (11:00 +1000)]
Handle tracker announce prepare errors
Matt Joiner [Mon, 23 May 2016 00:19:14 +0000 (10:19 +1000)]
Update Torrent.wantPeersEvent in several places
Matt Joiner [Mon, 23 May 2016 00:18:58 +0000 (10:18 +1000)]
Add Torrent.AddTrackers
Matt Joiner [Mon, 23 May 2016 00:18:39 +0000 (10:18 +1000)]
cmd/torrent-metainfo-pprint: Add Announce and AnnounceList keys
Matt Joiner [Sun, 22 May 2016 23:29:14 +0000 (09:29 +1000)]
tracker: Skip any net errors to third party trackers
Matt Joiner [Sun, 22 May 2016 13:44:38 +0000 (23:44 +1000)]
Drop the lol://cheezburger tracker from the test torrent
Spams the logs too much.
Matt Joiner [Sun, 22 May 2016 13:44:08 +0000 (23:44 +1000)]
Don't start tracker scrapers if trackers are disabled
Matt Joiner [Sun, 22 May 2016 13:43:55 +0000 (23:43 +1000)]
Don't create an empty tracker URL if both AnnounceList and Announce are empty
Matt Joiner [Sun, 22 May 2016 12:45:08 +0000 (22:45 +1000)]
Rework torrent tracker scraping
New scrapers are added anytime trackers are added to a torrent. In the future they will also be stopped as soon as they're removed. All trackers are concurrently scraped, the old-style of sticking to one tracker that works is abandoned for now.
Matt Joiner [Sun, 22 May 2016 12:42:37 +0000 (22:42 +1000)]
Comment on tracker.AnnounceRequest.Event
Matt Joiner [Thu, 19 May 2016 14:48:46 +0000 (00:48 +1000)]
tracker: Allow resolving announce URL host in advance, and passing the desired Host field for HTTP requests
Also did some clean-up of the announce code, the concept of a client is going away.
Matt Joiner [Thu, 19 May 2016 13:58:00 +0000 (23:58 +1000)]
Fix the tracker method receivers and names
Matt Joiner [Thu, 19 May 2016 12:49:37 +0000 (22:49 +1000)]
Move torrent tracker methods into torrent.go
Matt Joiner [Thu, 19 May 2016 07:15:10 +0000 (17:15 +1000)]
Torrent.writeStatus: Include human readable torrent size
Matt Joiner [Tue, 17 May 2016 06:40:08 +0000 (16:40 +1000)]
Break out KRPC stuff from dht into new package
Matt Joiner [Tue, 17 May 2016 06:07:49 +0000 (16:07 +1000)]
dht.Server.query: Return nil Transaction if there's an error
Matt Joiner [Tue, 17 May 2016 06:07:03 +0000 (16:07 +1000)]
dht: Stop processing packet if server closes after unmarshalling
Matt Joiner [Tue, 17 May 2016 06:06:18 +0000 (16:06 +1000)]
dht: Don't contact nodes with an IP containing a leading octet of 0
Matt Joiner [Tue, 17 May 2016 06:04:33 +0000 (16:04 +1000)]
Improve dht.Transaction.SetResponseHandler comment
Matt Joiner [Mon, 16 May 2016 16:12:06 +0000 (02:12 +1000)]
Improve the note about chunk writing concurrency
Everytime I see memory spike I suspect this, and it isn't it.
Matt Joiner [Mon, 16 May 2016 12:32:00 +0000 (22:32 +1000)]
Changes to missinggo resource package
Matt Joiner [Mon, 16 May 2016 12:02:03 +0000 (22:02 +1000)]
Rename some storage funcs
Matt Joiner [Mon, 16 May 2016 11:50:43 +0000 (21:50 +1000)]
Rename storage.I->Client
Matt Joiner [Mon, 16 May 2016 10:11:00 +0000 (20:11 +1000)]
Test both resource and file backends to piece storage
Matt Joiner [Mon, 16 May 2016 10:10:33 +0000 (20:10 +1000)]
Remove unused fields in testDownloadCancelParams
Matt Joiner [Mon, 16 May 2016 09:50:46 +0000 (19:50 +1000)]
Don't log missing files during hashing
Matt Joiner [Mon, 16 May 2016 09:50:10 +0000 (19:50 +1000)]
Stop returning errors from the 2 callstacks to connectionLoop where errors are expected
Matt Joiner [Mon, 16 May 2016 08:48:56 +0000 (18:48 +1000)]
Return an error from Torrent.setMetadataSize
This should mean connections sending ridiculous metadata sizes get dropped.
Matt Joiner [Mon, 16 May 2016 08:46:38 +0000 (18:46 +1000)]
Move requestPendingMetadata onto connection from Client
Matt Joiner [Mon, 16 May 2016 08:45:23 +0000 (18:45 +1000)]
iplist/cmd/pack-blocklist use tagflag
Matt Joiner [Mon, 16 May 2016 08:44:58 +0000 (18:44 +1000)]
Add piece-per-resource storage
Matt Joiner [Thu, 12 May 2016 02:44:51 +0000 (12:44 +1000)]
Probably fix test failure
Due to some changes in the Torrent instantiation code, I think there's a race in this test to verify the piece before counting the pending chunks. The torrent isn't supposed to be complete to begin with, so give it a bogus data directory to ensure it.
Matt Joiner [Thu, 12 May 2016 02:43:37 +0000 (12:43 +1000)]
Bit of a tidy in the tracker code
Matt Joiner [Thu, 12 May 2016 02:26:09 +0000 (12:26 +1000)]
Torrent.AddPeers can't fail, so don't return an error
Matt Joiner [Wed, 11 May 2016 13:50:21 +0000 (23:50 +1000)]
Fix race marshalling a bitfield after a Have has also been posted
Matt Joiner [Wed, 11 May 2016 11:53:42 +0000 (21:53 +1000)]
Update package doc
In particular, ConfigDir has gone away.
Matt Joiner [Wed, 11 May 2016 11:44:55 +0000 (21:44 +1000)]
Get rid of obsoleted Torrent.ceaseNetworking, and clean up Torrent.closing
Matt Joiner [Wed, 11 May 2016 11:11:52 +0000 (21:11 +1000)]
Rework Client listeners
In particular, if the ListenAddr used a dynamic port ":0", and both TCP and uTP were enabled. If the TCP listen succeeded, and the uTP did not, the TCP listener was leaked, and another port number was not tried.
Matt Joiner [Wed, 11 May 2016 11:08:55 +0000 (21:08 +1000)]
Remove unused Client.pruneTimer
Matt Joiner [Mon, 9 May 2016 13:00:20 +0000 (23:00 +1000)]
Wasn't using ChunkSize from TorrentSpec
Matt Joiner [Mon, 9 May 2016 06:44:06 +0000 (16:44 +1000)]
Lock now required around missinggo.Event variables
Matt Joiner [Mon, 9 May 2016 05:47:39 +0000 (15:47 +1000)]
Rework setting of info bytes