]> Sergey Matveev's repositories - btrtrc.git/log
btrtrc.git
9 years agoTidy up a test that fails with the wrong reasons
Matt Joiner [Thu, 24 Mar 2016 12:52:38 +0000 (23:52 +1100)]
Tidy up a test that fails with the wrong reasons

9 years agoTidy up bytesLeft calculations
Matt Joiner [Tue, 22 Mar 2016 02:11:36 +0000 (13:11 +1100)]
Tidy up bytesLeft calculations

This should fix a bug where completion is shown as negative in WriteStatus

9 years agoLog connection errors when debug mode
Matt Joiner [Tue, 22 Mar 2016 02:10:18 +0000 (13:10 +1100)]
Log connection errors when debug mode

9 years agoAdd a test for bad have messages
Matt Joiner [Tue, 22 Mar 2016 02:09:02 +0000 (13:09 +1100)]
Add a test for bad have messages

The reason for the cleanup to peer have-related messages in the first place.

9 years agoTidy up the peer have{,all,none},bitfield handling
Matt Joiner [Tue, 22 Mar 2016 01:07:03 +0000 (12:07 +1100)]
Tidy up the peer have{,all,none},bitfield handling

9 years agoAdd t.bytesLeftAnnounce
Matt Joiner [Mon, 21 Mar 2016 22:06:48 +0000 (09:06 +1100)]
Add t.bytesLeftAnnounce

Now it's safe to remove tracker specific bytesLeft contract

9 years agoClient.WriteStatus: Raise the precision of the completion percentage
Matt Joiner [Mon, 21 Mar 2016 21:33:08 +0000 (08:33 +1100)]
Client.WriteStatus: Raise the precision of the completion percentage

9 years agoUse missinggo.AddrPort directly
Matt Joiner [Mon, 21 Mar 2016 05:02:36 +0000 (16:02 +1100)]
Use missinggo.AddrPort directly

9 years agoMake peerGotPiece a method on connection
Matt Joiner [Mon, 21 Mar 2016 03:19:51 +0000 (14:19 +1100)]
Make peerGotPiece a method on connection

9 years agoMove peerGotPiece
Matt Joiner [Mon, 21 Mar 2016 03:17:15 +0000 (14:17 +1100)]
Move peerGotPiece

9 years agoAdd some File method comments
Matt Joiner [Sat, 19 Mar 2016 06:40:30 +0000 (17:40 +1100)]
Add some File method comments

9 years agoFavour earlier pieces slightly, helps with in-order downloads
Matt Joiner [Sat, 19 Mar 2016 06:40:18 +0000 (17:40 +1100)]
Favour earlier pieces slightly, helps with in-order downloads

9 years agoFix locks on Reader.SetReadahead
Matt Joiner [Sat, 19 Mar 2016 06:39:56 +0000 (17:39 +1100)]
Fix locks on Reader.SetReadahead

9 years agoUse new missinggo.SplitHostMaybePort implementation
Matt Joiner [Tue, 15 Mar 2016 10:32:47 +0000 (21:32 +1100)]
Use new missinggo.SplitHostMaybePort implementation

10 years agoTrack accepted connections
Matt Joiner [Sun, 6 Mar 2016 06:26:04 +0000 (17:26 +1100)]
Track accepted connections

10 years agoUse missinggo.Event to track Client closed
Matt Joiner [Sat, 5 Mar 2016 08:36:21 +0000 (19:36 +1100)]
Use missinggo.Event to track Client closed

10 years agoFix a UTP Conn leak, on unencrypted followup dial attempts
Matt Joiner [Wed, 2 Mar 2016 12:27:46 +0000 (23:27 +1100)]
Fix a UTP Conn leak, on unencrypted followup dial attempts

I would guess that TCP ones were cleaned up by GC.

10 years agoAdd Reader.Torrent()
Matt Joiner [Wed, 2 Mar 2016 12:26:46 +0000 (23:26 +1100)]
Add Reader.Torrent()

10 years agoExtend the timeout, drone.io is slow?
Matt Joiner [Fri, 26 Feb 2016 11:18:08 +0000 (22:18 +1100)]
Extend the timeout, drone.io is slow?

10 years agoIgnore the corner case when a piece is dropped from storage
Matt Joiner [Fri, 26 Feb 2016 11:12:13 +0000 (22:12 +1100)]
Ignore the corner case when a piece is dropped from storage

10 years agodht: Use missinggo.Event for closing
Matt Joiner [Fri, 26 Feb 2016 11:11:48 +0000 (22:11 +1100)]
dht: Use missinggo.Event for closing

10 years agoAdd test checking that cancel works
Matt Joiner [Fri, 26 Feb 2016 11:10:29 +0000 (22:10 +1100)]
Add test checking that cancel works

10 years agoCatch error creating client in tests
Matt Joiner [Fri, 26 Feb 2016 11:10:09 +0000 (22:10 +1100)]
Catch error creating client in tests

10 years agoFix bad DHT node in tests in constructed torrent
Matt Joiner [Wed, 24 Feb 2016 10:57:30 +0000 (21:57 +1100)]
Fix bad DHT node in tests in constructed torrent

10 years agoAdd DHT nodes from metainfo when added to Client
Matt Joiner [Wed, 24 Feb 2016 10:56:50 +0000 (21:56 +1100)]
Add DHT nodes from metainfo when added to Client

10 years agodht: Rename newDHTAddr->NewAddr, and clean up the interface
Matt Joiner [Tue, 23 Feb 2016 15:02:33 +0000 (02:02 +1100)]
dht: Rename newDHTAddr->NewAddr, and clean up the interface

10 years agodht: Rename dHTAddr to Addr
Matt Joiner [Tue, 23 Feb 2016 14:50:15 +0000 (01:50 +1100)]
dht: Rename dHTAddr to Addr

10 years agoTest that metainfo nodes are added to the DHT
Matt Joiner [Tue, 23 Feb 2016 14:48:44 +0000 (01:48 +1100)]
Test that metainfo nodes are added to the DHT

10 years agometainfo: Check for error unmarshalling bad nodes contents from a metainfo
Matt Joiner [Tue, 23 Feb 2016 12:53:39 +0000 (23:53 +1100)]
metainfo: Check for error unmarshalling bad nodes contents from a metainfo

10 years agodht: Misc trivial improvements
Matt Joiner [Tue, 23 Feb 2016 12:52:30 +0000 (23:52 +1100)]
dht: Misc trivial improvements

10 years agometainfo: Fix use of CastSlice when copying nodes
Matt Joiner [Tue, 23 Feb 2016 11:47:41 +0000 (22:47 +1100)]
metainfo: Fix use of CastSlice when copying nodes

10 years agometainfo: Ensure that nodes encode correctly
Matt Joiner [Tue, 23 Feb 2016 11:37:38 +0000 (22:37 +1100)]
metainfo: Ensure that nodes encode correctly

10 years agometainfo: Support nodes as []string or [](string, int64)
Matt Joiner [Tue, 23 Feb 2016 11:28:23 +0000 (22:28 +1100)]
metainfo: Support nodes as []string or [](string, int64)

Fixes #65.

10 years agometainfo: It looks like the "nodes" field of metainfo was never handled correctly...
Matt Joiner [Tue, 23 Feb 2016 11:04:06 +0000 (22:04 +1100)]
metainfo: It looks like the "nodes" field of metainfo was never handled correctly, support []string instead of [][]string, fix tests

10 years agometainfo tests: Fix some naming conventions
Matt Joiner [Tue, 23 Feb 2016 10:50:07 +0000 (21:50 +1100)]
metainfo tests: Fix some naming conventions

10 years agobencode: Update some test code
Matt Joiner [Tue, 23 Feb 2016 10:47:00 +0000 (21:47 +1100)]
bencode: Update some test code

10 years agobencode tests: Idiomatize identifier naming
Matt Joiner [Tue, 23 Feb 2016 10:43:05 +0000 (21:43 +1100)]
bencode tests: Idiomatize identifier naming

10 years agobencode: Use the testdata convention in tests
Matt Joiner [Tue, 23 Feb 2016 10:31:15 +0000 (21:31 +1100)]
bencode: Use the testdata convention in tests

10 years agoCatch error creating new client in test
Matt Joiner [Mon, 22 Feb 2016 03:30:02 +0000 (14:30 +1100)]
Catch error creating new client in test

10 years agoFix failure to request data from peers if it goes missing after being downloaded...
Matt Joiner [Sun, 21 Feb 2016 16:23:49 +0000 (03:23 +1100)]
Fix failure to request data from peers if it goes missing after being downloaded during the same session

The chunks remained marked dirty, even after the piece was marked complete. So when the piece was not complete, there was nothing to do.

10 years agofs: Fix what looks like a glaring mistake: If Seek failed on the torrent reader,...
Matt Joiner [Sun, 21 Feb 2016 15:44:29 +0000 (02:44 +1100)]
fs: Fix what looks like a glaring mistake: If Seek failed on the torrent reader, it would have got stuck

Since Seek is artificial, and the offsets are usually checked in the caller, it looks like it never failed anyway.

10 years agoFix races in Reader
Matt Joiner [Sun, 21 Feb 2016 15:42:01 +0000 (02:42 +1100)]
Fix races in Reader

10 years agoAdd a client transfer test with limited file cache, and a second pass read
Matt Joiner [Sun, 21 Feb 2016 15:41:07 +0000 (02:41 +1100)]
Add a client transfer test with limited file cache, and a second pass read

10 years agofs: Change listen addrs to localhost in tests
Matt Joiner [Sun, 21 Feb 2016 15:39:49 +0000 (02:39 +1100)]
fs: Change listen addrs to localhost in tests

Seems to improve reliability. Maybe the missinggo.Addr{IP,Port} change did something.

10 years agofs: Tidy up tests
Matt Joiner [Sun, 21 Feb 2016 15:38:52 +0000 (02:38 +1100)]
fs: Tidy up tests

10 years agoMove exportClientStatus to testutil.ExportStatusWriter
Matt Joiner [Sun, 21 Feb 2016 15:36:41 +0000 (02:36 +1100)]
Move exportClientStatus to testutil.ExportStatusWriter

10 years agoUpdate Reader pos between reads
Matt Joiner [Sun, 21 Feb 2016 13:32:02 +0000 (00:32 +1100)]
Update Reader pos between reads

10 years agoDon't run TestCompletedPieceWrongSize in parallel because it messes up logs
Matt Joiner [Sun, 21 Feb 2016 13:31:06 +0000 (00:31 +1100)]
Don't run TestCompletedPieceWrongSize in parallel because it messes up logs

10 years agoTest a ton of permutations for readahead and responsive
Matt Joiner [Sun, 21 Feb 2016 13:30:42 +0000 (00:30 +1100)]
Test a ton of permutations for readahead and responsive

10 years agoTidy up TestClientTransfer
Matt Joiner [Sun, 21 Feb 2016 11:08:01 +0000 (22:08 +1100)]
Tidy up TestClientTransfer

10 years agoOff by one error in torrent.pieceLength?
Matt Joiner [Sun, 21 Feb 2016 06:25:47 +0000 (17:25 +1100)]
Off by one error in torrent.pieceLength?

10 years agoAdd peer_protocol.Integer.Int()
Matt Joiner [Sun, 21 Feb 2016 06:25:26 +0000 (17:25 +1100)]
Add peer_protocol.Integer.Int()

10 years agoRefresh all piece completion states when data is missing
Matt Joiner [Sun, 21 Feb 2016 06:24:59 +0000 (17:24 +1100)]
Refresh all piece completion states when data is missing

10 years agoChoke peers when we lose pieces they requested, and drop them if they request pieces...
Matt Joiner [Sun, 21 Feb 2016 06:22:55 +0000 (17:22 +1100)]
Choke peers when we lose pieces they requested, and drop them if they request pieces we don't have

10 years agoFix race updating piece priority when piece being read is unexpectedly unavailable
Matt Joiner [Sat, 20 Feb 2016 16:33:39 +0000 (03:33 +1100)]
Fix race updating piece priority when piece being read is unexpectedly unavailable

10 years agoMove dataReadAt to torrent.readAt, and do the waitNoPendingWrites check there
Matt Joiner [Sat, 20 Feb 2016 16:32:59 +0000 (03:32 +1100)]
Move dataReadAt to torrent.readAt, and do the waitNoPendingWrites check there

10 years agoDitch the torrent stateMu for the client mutex
Matt Joiner [Sat, 20 Feb 2016 16:31:50 +0000 (03:31 +1100)]
Ditch the torrent stateMu for the client mutex

10 years agoCode comment
Matt Joiner [Sat, 20 Feb 2016 03:41:04 +0000 (14:41 +1100)]
Code comment

10 years agoImprove log message
Matt Joiner [Sat, 20 Feb 2016 03:40:55 +0000 (14:40 +1100)]
Improve log message

10 years agoUse new error handling philosophy
Matt Joiner [Sat, 20 Feb 2016 03:40:28 +0000 (14:40 +1100)]
Use new error handling philosophy

10 years agoExport torrent.String to Torrent
Matt Joiner [Sat, 20 Feb 2016 03:39:56 +0000 (14:39 +1100)]
Export torrent.String to Torrent

10 years agoDitch Data.WriteSectionTo, and fix cmd/torrent-verify
Matt Joiner [Thu, 18 Feb 2016 00:45:31 +0000 (11:45 +1100)]
Ditch Data.WriteSectionTo, and fix cmd/torrent-verify

10 years agoRework Reader reading, and TestCompletedPieceWrongSize
Matt Joiner [Wed, 17 Feb 2016 07:26:10 +0000 (18:26 +1100)]
Rework Reader reading, and TestCompletedPieceWrongSize

10 years agodata/file: Return EOF on reads past end
Matt Joiner [Wed, 17 Feb 2016 06:58:20 +0000 (17:58 +1100)]
data/file: Return EOF on reads past end

10 years agoAvoid error message when we attempt to complete a piece that's already complete
Matt Joiner [Wed, 17 Feb 2016 06:21:03 +0000 (17:21 +1100)]
Avoid error message when we attempt to complete a piece that's already complete

10 years agoRemove pointless code
Matt Joiner [Wed, 17 Feb 2016 06:20:43 +0000 (17:20 +1100)]
Remove pointless code

10 years agoEnsure piece completion state is correct at startup
Matt Joiner [Wed, 17 Feb 2016 06:20:21 +0000 (17:20 +1100)]
Ensure piece completion state is correct at startup

10 years agodata/pieceStore: Incorrectly public PieceCompleted method
Matt Joiner [Wed, 17 Feb 2016 06:10:34 +0000 (17:10 +1100)]
data/pieceStore: Incorrectly public PieceCompleted method

10 years agoCode comments
Matt Joiner [Wed, 17 Feb 2016 06:09:43 +0000 (17:09 +1100)]
Code comments

10 years agoAdd a test for starting a torrent where pieces are already complete
Matt Joiner [Wed, 17 Feb 2016 06:09:05 +0000 (17:09 +1100)]
Add a test for starting a torrent where pieces are already complete

10 years agoRename issue 35 testing config function to avoid confusion
Matt Joiner [Wed, 17 Feb 2016 06:08:01 +0000 (17:08 +1100)]
Rename issue 35 testing config function to avoid confusion

10 years agoAdd torrent.completedPieces bitmap
Matt Joiner [Tue, 16 Feb 2016 13:00:55 +0000 (00:00 +1100)]
Add torrent.completedPieces bitmap

Reduce load on data.PieceComplete for torrents with lots of pieces, when reader position changes. Not sure of the improvement yet.

10 years agoImprove error message when piece fails to be completed
Matt Joiner [Tue, 16 Feb 2016 12:35:19 +0000 (23:35 +1100)]
Improve error message when piece fails to be completed

Happens occasionally on some servers, can't work out why.

10 years agoOnly assert we should be requesting a piece in debug mode
Matt Joiner [Mon, 15 Feb 2016 06:47:04 +0000 (17:47 +1100)]
Only assert we should be requesting a piece in debug mode

10 years agoMerge pull request #64 from robaman/master
Matt Joiner [Sun, 14 Feb 2016 20:22:36 +0000 (07:22 +1100)]
Merge pull request #64 from robaman/master

Retain query parameters from announce URL.

10 years agoRetain query parameters from announce URL.
Robert Kästel [Sun, 14 Feb 2016 20:15:51 +0000 (21:15 +0100)]
Retain query parameters from announce URL.

10 years agoTrigger piece request order changes on connections in a few spots
Matt Joiner [Thu, 11 Feb 2016 06:57:57 +0000 (17:57 +1100)]
Trigger piece request order changes on connections in a few spots

The client was requesting already obtained data in certain circumstances. This fixes it.

10 years agoUse Cache.StatFile to get piece length in the backend
Matt Joiner [Tue, 9 Feb 2016 13:48:23 +0000 (00:48 +1100)]
Use Cache.StatFile to get piece length in the backend

10 years agoStill update a connections piece priority even if the peer doesn't have the piece
Matt Joiner [Tue, 9 Feb 2016 13:47:53 +0000 (00:47 +1100)]
Still update a connections piece priority even if the peer doesn't have the piece

10 years agotorrent.piecePartiallyDownloaded incorrectly returned true when all the chunks were...
Matt Joiner [Tue, 9 Feb 2016 13:46:54 +0000 (00:46 +1100)]
torrent.piecePartiallyDownloaded incorrectly returned true when all the chunks were dirty

10 years agoTrack posted message type counts
Matt Joiner [Tue, 9 Feb 2016 13:45:47 +0000 (00:45 +1100)]
Track posted message type counts

10 years agoWhen we're choked, just forget the requests, we don't need to delete them individuall...
Matt Joiner [Mon, 8 Feb 2016 10:39:15 +0000 (21:39 +1100)]
When we're choked, just forget the requests, we don't need to delete them individually anymore

10 years agoAdd some missing calls to torrent.updatePiecePriority
Matt Joiner [Mon, 8 Feb 2016 10:38:30 +0000 (21:38 +1100)]
Add some missing calls to torrent.updatePiecePriority

10 years agoFix pending of already completed pieces when pending ranges of pieces
Matt Joiner [Mon, 8 Feb 2016 10:36:50 +0000 (21:36 +1100)]
Fix pending of already completed pieces when pending ranges of pieces

10 years agoReintroduce 64 outbound request cap
Matt Joiner [Mon, 8 Feb 2016 05:09:12 +0000 (16:09 +1100)]
Reintroduce 64 outbound request cap

10 years agoRemove unreachable code
Matt Joiner [Sun, 7 Feb 2016 16:01:54 +0000 (03:01 +1100)]
Remove unreachable code

10 years agoRework requesting of shuffled pending pieces
Matt Joiner [Sun, 7 Feb 2016 10:58:48 +0000 (21:58 +1100)]
Rework requesting of shuffled pending pieces

10 years agoExport Torrent.PieceState()
Matt Joiner [Sun, 7 Feb 2016 10:57:57 +0000 (21:57 +1100)]
Export Torrent.PieceState()

10 years agoFix overpublishing of piece state change during hashing
Matt Joiner [Sun, 7 Feb 2016 10:56:59 +0000 (21:56 +1100)]
Fix overpublishing of piece state change during hashing

10 years agoExport PieceStateChange through piece state change pubsub
Matt Joiner [Sun, 7 Feb 2016 10:55:47 +0000 (21:55 +1100)]
Export PieceStateChange through piece state change pubsub

10 years agoUse new tracker package interface
Matt Joiner [Sun, 7 Feb 2016 07:49:35 +0000 (18:49 +1100)]
Use new tracker package interface

10 years agotracker: Shoehorn old client implementations into new tracker Announce interface
Matt Joiner [Sun, 7 Feb 2016 07:06:13 +0000 (18:06 +1100)]
tracker: Shoehorn old client implementations into new tracker Announce interface

10 years agotracker: Rename response->httpResponse
Matt Joiner [Sun, 7 Feb 2016 06:45:46 +0000 (17:45 +1100)]
tracker: Rename response->httpResponse

10 years agoPrefix the Action constants
Matt Joiner [Sun, 7 Feb 2016 06:16:01 +0000 (17:16 +1100)]
Prefix the Action constants

In preparation to rework the client interface

10 years agoReinstate File.PrioritizeRegion() for backward compatibility
Matt Joiner [Sun, 7 Feb 2016 06:15:06 +0000 (17:15 +1100)]
Reinstate File.PrioritizeRegion() for backward compatibility

10 years agoUse new missinggo iterator style, and speed up torrent.connHasWantedPieces()
Matt Joiner [Sat, 6 Feb 2016 14:22:31 +0000 (01:22 +1100)]
Use new missinggo iterator style, and speed up torrent.connHasWantedPieces()

10 years agoPublish changes in piece hashing state
Matt Joiner [Sat, 6 Feb 2016 14:21:12 +0000 (01:21 +1100)]
Publish changes in piece hashing state

10 years agoSpeed up torrent.needData, and use new missinggo iterator interface
Matt Joiner [Sat, 6 Feb 2016 14:20:40 +0000 (01:20 +1100)]
Speed up torrent.needData, and use new missinggo iterator interface

10 years agoUse missinggo.bitmap for tracking dirty chunks
Matt Joiner [Fri, 5 Feb 2016 04:45:32 +0000 (15:45 +1100)]
Use missinggo.bitmap for tracking dirty chunks

10 years agotracker: Rename the http client type to httpClient
Matt Joiner [Fri, 5 Feb 2016 04:42:23 +0000 (15:42 +1100)]
tracker: Rename the http client type to httpClient