Page 1 of 1

crash recovery may be improved

Posted: Sat Apr 19, 2008 7:22 am
by lvm
part 1: rant, but may be useful to some deluge users

0.5.8.8 crashed overnight and continued crashing when restarted. I checked web site, found that 0.5.8.9 is out (and yes - crashes when adding new torrents - I had a couple of those...), installed it - nothing's changed, still crashes. Ok, FAQ says: delete persistent.state - done it, re-added my seeded torrents - and deluge started re-downloading them, apparently because I moved most of the files from the default download folder to their proper locations and these locations were stored in persistent.state. So I am supposed to re-assign paths manually to all of my 50+ seeded torrents? Fat chance (BTW how can I specify a path at torrent open?), I'd rather restore last good persistent.state from a backup - and the most disturbing thing happened, deluge continued re-downloading torrents this time overwriting files already moved to their proper folders! That actually was my fault - I should've deleted .fastresume files which were created when I added torrents the first time, but this is not in the FAQ and took a couple of rather stressed minutes to figure out. After that I started deluge, run a forced check and found out that all is fine.

part 2: lessons - hope deluge team does something about it

Storing file locations in persistent.state is not a good idea and may make recovery from the crash damn difficult especially for heavy seeders. There should be a more reliable separate storage, preferably a plain text file with (<torrent file> <folder>) records.

It is also worth mentioning in the FAQ that .fastresume files should be deleted when recovering from a crash. Apparently the worst thing that can happen with bad .fastresume files is that some pieces will be downloaded the second time but better be safe than sorry.