#3322: All torrents disappear occasionally after restart
------------------------+---------------------
Reporter: Alexey104 | Owner:
Type: bug | Status: new
Priority: minor | Milestone: 2.0.4
Component: Unknown | Version: develop
Resolution: | Keywords:
------------------------+---------------------
Comment (by Xuefer):
exactly problem i'm suffering. i have to backup too in cron job. the *.bak
didn't help much as it get overwritten. archive folder helps sometime
until roll'ed after some days gone (let's say i have it restart everyday).
since deluge ran in the background in my downloader box, i don't check it
often.
i propose using "rename()" to fix this problem before the actual exception
is fixed
1. open(torrents.new), write(), close()
2. optionally unlink(torrents) if OS is windows
3. rename(torrents.new, torrents) only after everything's fine:
no exception, no error, no crash, not kill'ed.
since rename() is atomic operation while write() isn't. rename() is a
common way to help better fighting data loss in this case, mostly
exception and unexpected power loss
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3322#comment:5>
Deluge <https://deluge-torrent.org/>
Deluge Project
--
You received this message because you are subscribed to the Google Groups
"Deluge Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/deluge-dev/063.064da683d65bf0187a2a17face768eda%40deluge-torrent.org.