Yes, sure.
Things that I can think of, and not sure if it really is the best way to address the outstanding issues;
IF a crash is happening during the apply/rollback, things are a bit undeterministic, especially since it is hard to know in which order the OS is persisting the changes to durable media. It isn't required to do so in the same order it is requested, for performance reasons.
1. At entrance of UowFileFactory.beforeCompletion, I suggest (possibly configurable) that first is a "work log" created, which describes what is to be done. This "work log" is written to disk, and a hard file sync is waited for, to provide the highest level of durability (there are still cases when it doesn't happen though)
2. On creation of UoWFileFactory, look for these "work log" files and do the "apply" and "rollback" accordingly. In fact, it could be the same routine as being used in the 'normal' case, to ensure "exercising" this codebase.
3. Currently, IIUIC, the 'delete file' operation will not be 'visible' in such a restart, and a marker for this is also needed for the "work log", I think.
I know these are relatively small matters, but in case one wants to make it better than currently.
Cheers
Niclas