These are chat archives for anacrolix/torrent

25th
Nov 2017
Matt Joiner
@anacrolix
Nov 25 2017 00:01
Hey, this is very helpful, now I have more context about the issue.
Are you trying to cache things? If so, are using the piece resource storage?
Are you*
There's a few places where the client should flush its cache of piece completion, like when it fails to read data from storage while uploading or serving Reader.Read
Denis
@elgatito
Nov 25 2017 07:34
Yes, i serve completion in a right way, but when i delete unused piece and later want that piece again - library completedpieces bitmap is not updated, so it gets updated only when read/write fails, as youve said
Denis
@elgatito
Nov 25 2017 08:03

Are you trying to cache things?

my Completion always returns proper status of a piece

I will investigate more how the library deals with alreader deleted pieces
there are 2 common use cases: 1) I download last N pieces, they are needed by Kodi before starting a playback (probably detecting media type/format)
2) Used seeks video, but that place was downloaded and deleted before
in both cases, before readers wants to read/write that piece- library thinks it has those pieces and not trying to download them. That is why I'm thinking of making a proxy call to t.updatePiece() to force it to recheck status after I deleted completed piece from my storage
Denis
@elgatito
Nov 25 2017 20:39
hm.. added a function to force updatePiece calls, then tested with/without, but looks that library is setting priority for those pieces in any way
will look further