#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 |
Description
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 , 13 years ago
Component: | other → core |
---|---|
Keywords: | clean exit force killing cache torrent list stats added |
Version: | other (please specify) → 1.3.3 |
comment:2 by , 13 years ago
comment:3 by , 11 years ago
Milestone: | Future → 1.4.0 |
---|---|
Owner: | set to |
Status: | new → assigned |
Summary: | Clean exit verification and torrentlist stats caching → Clean 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 , 11 years ago
Actually this is the discussed pseudocode:
On startup: os.path.exists("state_file_test"): copy("torrents.state.prev", permanent dir/name) copy("torrents.state", permanent dir/name) Warn user? cp torrents.state to torrents.state.prev load_state... on shutdown: save state delete "state_file_test"
comment:5 by , 11 years ago
I have committed code 2c4ef9dbb30 that achieves the above pseudocode but still require some form of user notification.
comment:6 by , 10 years ago
Milestone: | 1.4.0 → 2.0.0 |
---|
comment:8 by , 7 years ago
Resolution: | → Fixed |
---|---|
Status: | assigned → closed |
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.
There was a recent fix applied that may be relevant here: 0676aaf91