Comment 4 for bug 897469

Revision history for this message
Timo Kluck (tkluck) wrote : Re: [Bug 897469] Re: Simple Scan crashes result in preventable data loss

> 1- how does sqlite handle crashing? this patch will not improve the
> situation if one ends up with a corrupted sqlite database... does it do
> transactions or do you have something like fsync to force writeout ...

According to [1], Sqlite is extremely reliable in this regard. "All
changes within a single transaction in SQLite either occur completely
or not at all, even if the act of writing the change out to the disk
is interrupted by a program crash, an operating system crash, or a
power failure."

> 2- as far as i can tell the feature request from (amongst other reports)
> Bug #483392 -- namely: resuming a previous session -- could be trivially
> solved with the same underlying code if there was an option to
> gracefully exit simple-scan while leaving behind the sqlite-entry that
> will tigger "recovery" on the next startup. could you look into adding
> this?

You're right, this would be trivial. It just needs UI design. It
possibly makes sense to just have this as the default behaviour,
because it is easy enough to click the file -> new button. Or make it
default behaviour in case of unsaved changes.

[1] http://sqlite.org/transactional.html