These are chat archives for anacrolix/torrent

27th
Dec 2017
first one is interesting, can be searched by Complete: 134. Client is trying to read the piece, then setting it to complete and after it's set to complete it appears in the "next pieces"
Denis
@elgatito
Dec 27 2017 09:44
maybe some logic breaks when piece is deleted and later is needed by readers, which expect it?
there reader sees piece as available, doing a t.readAtcall, then gets an error, showing an error (error reading torrent "The Thinning (2016) HDRip" piece 97 offset 0, 32768 bytes: unexpected EOF) and doing updateAllPieceCompletions + updateAllPiecePriorities, so later we see the piece is in the queue
Denis
@elgatito
Dec 27 2017 12:14
just a guess: p.dirtyChunks is not filling with missing chunks when piece is marked as MarkNotComplete()
piece itself is marked as not complete and needs to be downloaded, but it's chunks pending list is empty and nothing happen to satisfy the piece completion
Denis
@elgatito
Dec 27 2017 12:37
pieceAllDirty will be truefor previously completed piece and will not truncate p.dirtyChunks to redownload it
if that is a problem of these issues, I can return specific error from p.ReadAt/p.WriteAt, and so if this error happen - clean dirtyChunks
Denis
@elgatito
Dec 27 2017 12:44
if I am corrent, then a small change to storage/wrappers.go into WriteAt/ReadAt will do the trick. If all is right - I can do the PR