Opened 13 years ago

Closed 7 years ago

Last modified 6 years ago

#2016 closed feature-request (Fixed)

Clean exit verification with state backup

Reported by: Chotaz Owned by: Calum
Priority: minor Milestone: 2.0.0
Component: Core Version: 1.3.3
Keywords: clean exit force killing cache torrent list stats Cc: Bro


I usually have a large volume of torrents attached to deluge(currently 4TB in files, indivudual torrent size goes up to 100GB) and having this large storage system, I like to periodically check my disks for errors. Yet this has been taking some time off my seeding because with this large amount of torrents, every time i try closing the deamon(pkill deluge), it doesn't quit cleanly. This makes deluge have to check 4TB of files every single time i kill or stop deluged(usually takes a full day to do so with my drives).

My idea was to add a flag on the deamon close function that gets set if it's done cleanly and a way to cache torrent stats. The flag would be verified everytime the daemon is ran again and if it wasnt found, the latest cached stats would load after all the torrent checking is done.

Change History (9)

comment:1 by Chotaz, 13 years ago

Component: othercore
Keywords: clean exit force killing cache torrent list stats added
Version: other (please specify)1.3.3

comment:2 by Calum, 12 years ago

There was a recent fix applied that may be relevant here: 0676aaf91

comment:3 by Calum, 11 years ago

Milestone: Future1.4.0
Owner: set to Calum
Status: newassigned
Summary: Clean exit verification and torrentlist stats cachingClean exit verification with state backup

We are looking to backup the state file and restore if a non-clean shutdown was detected which I think will cover what you are asking for.

comment:4 by Calum, 11 years ago

Actually this is the discussed pseudocode:

On startup:
    copy("torrents.state.prev", permanent dir/name)
    copy("torrents.state", permanent dir/name)
    Warn user?
cp torrents.state to torrents.state.prev
on shutdown:
   save state
   delete "state_file_test"

comment:5 by Calum, 11 years ago

I have committed code 2c4ef9dbb30 that achieves the above pseudocode but still require some form of user notification.

comment:6 by Calum, 10 years ago


comment:7 by Bro, 9 years ago

Cc: Bro added

Add bro to cc

comment:8 by Calum, 7 years ago

Resolution: Fixed
Status: assignedclosed

Updated to use tarfile: [45e0d1093]

It is possible that might need to add code to delete old archives but since shutting down in more robust this should be less of an issue.

comment:9 by Calum, 6 years ago


Milestone renamed

Note: See TracTickets for help on using tickets.