Commit Graph

17 Commits

Author SHA1 Message Date
Matt Joiner 388e6899a1 piece resource storage: Delete incomplete chunks concurrently after writing complete piece 2020-11-21 13:44:23 +11:00
Matt Joiner b35c204238 Use ConsecutiveChunkWriter in MarkComplete for piece resource storage if available 2020-11-21 13:44:23 +11:00
Matt Joiner 7cb74b158f Replace storage.IncompletePieceToWriter with io.Writer
It was incorrect to assume piece hashing only operates on incomplete chunk data. This actually uncovered a bug where duplicate hash checks occurred, and the redundant checks would fail due to not reading the completed data.
2020-11-06 16:23:38 +11:00
Matt Joiner 636b20b860 Add write incomplete/consecutive chunks interfaces 2020-11-02 15:35:07 +11:00
Matt Joiner 00ac333ea2 Panic on bad piece per resource chunk names
This was masking a bug in a coming sqlite storage implementation. Maybe it could be relaxed to checking for no filepath.Dir in the future.
2020-10-11 12:57:33 +11:00
Matt Joiner 898260c177 Tidy up some storage close handling 2020-10-11 12:40:43 +11:00
Matt Joiner c855c7a366 Differentiate between storage.ClientImpl{,Closer} 2020-02-21 14:12:44 +11:00
Matt Joiner 72e54fb353 Resource per piece storage: Store incomplete chunks separately 2020-01-14 10:51:09 +11:00
Matt Joiner cb1bf0f413 goimports -local 2019-08-21 20:58:40 +10:00
Matt Joiner fc4fab91f5 Switch to goimports import sorting
Used to use sortimports, but it's old, and goimports seems to have an opinion now.
2018-11-02 23:12:01 +11:00
Matt Joiner dd083a4e11 Track completion known to implementation state
Addresses #193
2017-10-12 16:09:32 +11:00
Matt Joiner 1e919dd6b1 Rework storage interfaces to make them simpler to implement
This allows lots of behaviour to be baked into the new Client, Torrent and Piece wrappers, rather than duplicating (badly) them in all the backend implementations.
2016-09-02 15:10:57 +10:00
Matt Joiner 2a1cef7c9e Remove the InfoEx type, and don't generate its infohash on the fly
Fixes #106.
2016-08-26 20:29:05 +10:00
Matt Joiner 869fb25cbc Changes to missinggo resource package 2016-05-16 22:32:00 +10:00
Matt Joiner c1e0d37266 Rename some storage funcs 2016-05-16 22:02:03 +10:00
Matt Joiner 02ea8b1081 Rename storage.I->Client 2016-05-16 21:50:43 +10:00
Matt Joiner 61e43f4261 Add piece-per-resource storage 2016-05-16 18:44:58 +10:00