]> Sergey Matveev's repositories - btrtrc.git/log
btrtrc.git
8 years agoMove exportClientStatus to testutil.ExportStatusWriter
Matt Joiner [Sun, 21 Feb 2016 15:36:41 +0000 (02:36 +1100)]
Move exportClientStatus to testutil.ExportStatusWriter

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

8 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

8 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

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

8 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?

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

8 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

8 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

8 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

8 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

8 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

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

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

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

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

8 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

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

8 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

8 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

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

8 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

8 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

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

8 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

8 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

8 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.

8 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.

8 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

8 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.

8 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.

8 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.

8 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

8 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

8 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

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

8 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

8 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

8 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

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

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

8 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

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

8 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

8 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

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

8 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

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

8 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

8 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

8 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()

8 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

8 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

8 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

8 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

8 years agomissinggo.ZeroReader is now a var, not a type
Matt Joiner [Thu, 4 Feb 2016 14:20:02 +0000 (01:20 +1100)]
missinggo.ZeroReader is now a var, not a type

8 years agoChanges to piece priority need to be published as a piece state change
Matt Joiner [Thu, 4 Feb 2016 14:19:42 +0000 (01:19 +1100)]
Changes to piece priority need to be published as a piece state change

This occurs because we're now able to deprioritize pieces after readers seek or close

8 years agoAdd File.Cancel
Matt Joiner [Thu, 4 Feb 2016 14:18:54 +0000 (01:18 +1100)]
Add File.Cancel

8 years agoMissing Reader.Close in some tests
Matt Joiner [Thu, 4 Feb 2016 14:17:26 +0000 (01:17 +1100)]
Missing Reader.Close in some tests

8 years agoFix the mess that is the connectionLoop after messages are decoded
Matt Joiner [Thu, 4 Feb 2016 14:17:06 +0000 (01:17 +1100)]
Fix the mess that is the connectionLoop after messages are decoded

8 years agoTidy code
Matt Joiner [Thu, 4 Feb 2016 04:04:46 +0000 (15:04 +1100)]
Tidy code

8 years agoFix bug in readahead
Matt Joiner [Mon, 1 Feb 2016 17:45:57 +0000 (04:45 +1100)]
Fix bug in readahead

8 years agoconnection.Close must be called under the Client lock
Matt Joiner [Mon, 1 Feb 2016 13:45:26 +0000 (00:45 +1100)]
connection.Close must be called under the Client lock

8 years agogo vet
Matt Joiner [Mon, 1 Feb 2016 13:44:29 +0000 (00:44 +1100)]
go vet

8 years agoRecalculate all piece priorities more efficiently
Matt Joiner [Mon, 1 Feb 2016 11:06:13 +0000 (22:06 +1100)]
Recalculate all piece priorities more efficiently

8 years agoReintroduce connection piece inclinations, and begin caching piece priorities
Matt Joiner [Mon, 1 Feb 2016 10:11:41 +0000 (21:11 +1100)]
Reintroduce connection piece inclinations, and begin caching piece priorities

8 years agoExport leecher and seeder in TestClientTransfer
Matt Joiner [Mon, 1 Feb 2016 10:09:25 +0000 (21:09 +1100)]
Export leecher and seeder in TestClientTransfer

8 years agoUse missinggo.Event for connection closing event
Matt Joiner [Mon, 1 Feb 2016 10:08:52 +0000 (21:08 +1100)]
Use missinggo.Event for connection closing event

8 years agonewTorrent doesn't need to return error
Matt Joiner [Sun, 31 Jan 2016 20:05:43 +0000 (07:05 +1100)]
newTorrent doesn't need to return error

8 years agoAbstract the pendingPieces as a bitmap
Matt Joiner [Sun, 31 Jan 2016 14:46:28 +0000 (01:46 +1100)]
Abstract the pendingPieces as a bitmap

8 years agoBegin tracking use of file descriptors in UDP tracker
Matt Joiner [Sun, 31 Jan 2016 08:04:15 +0000 (19:04 +1100)]
Begin tracking use of file descriptors in UDP tracker

8 years agoutil/profile was replaced by github.com/anacrolix/envpprof
Matt Joiner [Sun, 31 Jan 2016 07:35:51 +0000 (18:35 +1100)]
util/profile was replaced by github.com/anacrolix/envpprof

8 years agoutil/levelmu is no longer in use
Matt Joiner [Sun, 31 Jan 2016 07:35:23 +0000 (18:35 +1100)]
util/levelmu is no longer in use

8 years agoTODO
Matt Joiner [Sun, 31 Jan 2016 07:35:08 +0000 (18:35 +1100)]
TODO

8 years agoObsolete NOTES file
Matt Joiner [Fri, 29 Jan 2016 18:19:39 +0000 (05:19 +1100)]
Obsolete NOTES file

8 years agoMerge pull request #60 from jpillora/patch-1
Matt Joiner [Fri, 29 Jan 2016 07:04:36 +0000 (18:04 +1100)]
Merge pull request #60 from jpillora/patch-1

list cloud torrent in "projects using Torrent"

8 years agolist cloud torrent in "projects using Torrent"
Jaime Pillora [Fri, 29 Jan 2016 05:13:24 +0000 (16:13 +1100)]
list cloud torrent in "projects using Torrent"

8 years agoMerge branch 'noprio2'
Matt Joiner [Thu, 28 Jan 2016 09:21:04 +0000 (20:21 +1100)]
Merge branch 'noprio2'

8 years agoRemove obsolete note about priorities
Matt Joiner [Thu, 28 Jan 2016 06:22:10 +0000 (17:22 +1100)]
Remove obsolete note about priorities

8 years agoFix stall if data goes missing during a read
Matt Joiner [Thu, 28 Jan 2016 02:21:50 +0000 (13:21 +1100)]
Fix stall if data goes missing during a read

8 years agoTODO
Matt Joiner [Thu, 28 Jan 2016 02:04:25 +0000 (13:04 +1100)]
TODO

8 years agoFix downloading of unwanted chunks, and write out downloaded chunks using the connect...
Matt Joiner [Wed, 27 Jan 2016 18:54:48 +0000 (05:54 +1100)]
Fix downloading of unwanted chunks, and write out downloaded chunks using the connection loop goroutine

Doing the writes with the connection loop goroutine prevents memory use blowing out when chunks aren't written out quickly enough.

8 years agoAdd pending write helpers
Matt Joiner [Sun, 24 Jan 2016 20:22:33 +0000 (07:22 +1100)]
Add pending write helpers

8 years agoReaders changing wasn't triggering waitAccept
Matt Joiner [Sun, 24 Jan 2016 17:14:19 +0000 (04:14 +1100)]
Readers changing wasn't triggering waitAccept

Caused occasional stall in TestSeedAfterDownloading.

8 years agoUse pendingPieces in needData
Matt Joiner [Sun, 24 Jan 2016 04:21:31 +0000 (15:21 +1100)]
Use pendingPieces in needData

8 years agoMove fillRequests and replenishConnRequests into connection.go
Matt Joiner [Sun, 24 Jan 2016 04:21:17 +0000 (15:21 +1100)]
Move fillRequests and replenishConnRequests into connection.go

8 years agoDelete finished pieces from pending
Matt Joiner [Mon, 18 Jan 2016 14:41:53 +0000 (01:41 +1100)]
Delete finished pieces from pending

8 years agorequire->assert in test
Matt Joiner [Mon, 18 Jan 2016 14:41:33 +0000 (01:41 +1100)]
require->assert in test

8 years agoFix the download/prioritize piece functions
Matt Joiner [Mon, 18 Jan 2016 14:28:56 +0000 (01:28 +1100)]
Fix the download/prioritize piece functions

This involves adding a pendingPieces field to torrent.

8 years agodht: Start timer under transaction lock
Matt Joiner [Mon, 18 Jan 2016 13:34:40 +0000 (00:34 +1100)]
dht: Start timer under transaction lock

Satisfies race detector

8 years agoFixes for torrent.Reader not having ReadAt
Matt Joiner [Mon, 18 Jan 2016 09:12:51 +0000 (20:12 +1100)]
Fixes for torrent.Reader not having ReadAt

8 years agoRemove internal/pieceordering
Matt Joiner [Mon, 18 Jan 2016 09:11:53 +0000 (20:11 +1100)]
Remove internal/pieceordering

8 years agoIt's working and the tests are usually passing
Matt Joiner [Mon, 18 Jan 2016 07:35:14 +0000 (18:35 +1100)]
It's working and the tests are usually passing

I still need to handle "prefetch"-style downloading, and some functions haven't been committed to force this issue.

8 years agoResurrect some comments on Torrent methods
Matt Joiner [Sat, 16 Jan 2016 14:49:34 +0000 (01:49 +1100)]
Resurrect some comments on Torrent methods

8 years agoReexport Torrent.MetaInfo
Matt Joiner [Sat, 16 Jan 2016 14:49:04 +0000 (01:49 +1100)]
Reexport Torrent.MetaInfo

8 years agoFinally make Torrent.torrent private
Matt Joiner [Sat, 16 Jan 2016 13:14:15 +0000 (00:14 +1100)]
Finally make Torrent.torrent private

A lot of code was using unintentionally exported stuff from the embedded *torrent in Torrent.

8 years agoMake Config.DHTConfig not a pointer
Matt Joiner [Sat, 16 Jan 2016 13:12:53 +0000 (00:12 +1100)]
Make Config.DHTConfig not a pointer

8 years agoTrack dirty chunks, instead of pending chunk specs
Matt Joiner [Wed, 13 Jan 2016 06:11:59 +0000 (17:11 +1100)]
Track dirty chunks, instead of pending chunk specs

This is the first step toward having purely Reader-based priorities. If a chunk is pending, that currently implies that we want to download it. I want to move that kind of state out to the readers.

8 years agoRevert "Merge pull request #54 from zhulik/master"
Matt Joiner [Wed, 6 Jan 2016 01:19:49 +0000 (12:19 +1100)]
Revert "Merge pull request #54 from zhulik/master"

This reverts commit 5cf75b869c469196a8473c4962b99a450daaeeec, reversing
changes made to 09050ff2c5607f3991e6ec6422ed57ba0dee0bad.

8 years agodataBackend/http: Replace connection pooling code with forced HTTP2
Matt Joiner [Wed, 6 Jan 2016 01:10:40 +0000 (12:10 +1100)]
dataBackend/http: Replace connection pooling code with forced HTTP2