[MOD] Adapted for upcoming non-blocking commits and restore in case of
a failure during commit.