Hi,

I have a synchronization issue on an embedded device running Linux : if a
power shutdown is done just after a commit, sqlite will restore the
database to the previous state using the journal file. At the end of a
transaction the unlink of the journal file is not enough, the journal could
physically persist on the file system several seconds after the call to
unlink and only a sync on the directory could guarantee that the journal
file has been physically deleted. You can strace sqlite3 tool to see that
the unlink of the journal file is not followed by any sync.

The fix is simple, sqlite3OsDelete should be called with the last parameter
(dirSync) set to 1. This fix is necessary to be compliant with the last
property of an ACID database.

Regards,

Florent
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to