On Thu, Jun 16, 2011 at 8:51 AM, <casper....@oracle.com> wrote: > If a database engine or another application keeps both the data and the > log in the same filesystem, a snapshot wouldn't create inconsistent data > (I think this would be true with vim and a large number of database > engines; vim will detect the swap file and datbase should be able to > detect the inconsistency and rollback and re-apply the log file.)
Correct. SQLite3 will be able to recover automatically from restores of mid-transaction snapshots. VIM does not recover automatically, but it does notice the swap file and warns the user and gives them a way to handle the problem. (When you save a file, VIM renames the old one out of the way, creates a new file with the original name, writes the new contents to it, closes it, then unlinks the swap file. On recovery VIM notices the swap file and gives the user a menu of choices.) I believe this is the best solution: write applications so they can recover from being restarted with data restored from a mid-transaction snapshot. Nico -- _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss