]> git.notmuchmail.org Git - notmuch/commit
lib: Split the database upgrade into two phases for safer operation.
authorCarl Worth <cworth@cworth.org>
Sat, 9 Jan 2010 19:13:12 +0000 (11:13 -0800)
committerCarl Worth <cworth@cworth.org>
Sat, 9 Jan 2010 19:13:12 +0000 (11:13 -0800)
commitd12801c8b4d04a50fcb912b75017244fb09658e8
tree8212267ab21f5e3f9fe274eaf53b58409445ada2
parent5fe5e802ab3101a375ec1262770955904e169e47
lib: Split the database upgrade into two phases for safer operation.

The first phase copies data from the old format to the new format
without deleting anything. This allows an old notmuch to still use the
database if the upgrade process gets interrupted. The second phase
performs the deletion (after updating the database version number). If
the second phase is interrupted, there will be some unused data in the
database, but it shouldn't cause any actual harm.
lib/database.cc
lib/message.cc
lib/notmuch-private.h