-
-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Call stop_io()/start_io() before/after backup export #2148
Comments
does this need to go into 1.15 (core 50) or is this specific to the new core? |
If you only use core releases, then it has to be done before you switch to the next release. But it has no negative consequences to do it right now, and it's a 2-line-change, so if you ask me, do it now :) |
Also, by stopping the IO before you do backup export, you already now prevent a possible database corruption (without upgrading the core), yet another reason to do it now 🚀 |
ok, doing it now. but question - why is the ui responsible for this and not the core? |
yeah, good question, no sure if it was discussed before, so only my 2cents without having followed all discussions to this fix before: i think, it makes some sense as also, probably the more important point, having functions that implicitly stop IO may easily result in race conditions. so, even if it cause a few more lines, i think it is a clearer approach to leave start/stop IO completely in the hand of one instance. but yes, as always, there are many ways to do things :) |
can we make the backup fail if the io is still running? is this issue/point documented in the documentation? (asking because issues in current ui's won't help new future ui's) |
this is actually the case, https://github.com/deltachat/deltachat-core-rust/blob/master/src/imex.rs#L689
yip: https://c.delta.chat/classdc__context__t.html#ab04a07bb49363824f6fe3b03e6aaaca7 |
See deltachat/deltachat-core-rust#2255
For Android, I already made a PR: https://github.com/deltachat/deltachat-android/pull/1822/files
For backup import it's not necessary as IO is not running before doing an import.
For key import/export, it doesn't hurt but isn't necessary.
The text was updated successfully, but these errors were encountered: