[PATCH v3 07/13] lib: Simplify upgrade code using a transaction

2014-07-31 Thread Austin Clements
Previously, the upgrade was organized as two passes -- an upgrade pass, and a separate cleanup pass -- so the database was always in a valid state. This change substantially simplifies this code by performing the upgrade in a transaction and combining both passes in to one. This 1) eliminates a l

[PATCH v3 07/13] lib: Simplify upgrade code using a transaction

2014-07-31 Thread Austin Clements
Previously, the upgrade was organized as two passes -- an upgrade pass, and a separate cleanup pass -- so the database was always in a valid state. This change substantially simplifies this code by performing the upgrade in a transaction and combining both passes in to one. This 1) eliminates a l