If compaction had not finished when it was stopped, then restore things to a state where compaction may begin again. This may help avoid any weird corruption due to moving files between stopping and starting. I tested this against a corrupt history file and it worked well and seems like a reasonable thing to do no matter what.
Fixes #40 - note that we don't attempt to fix reading a corrupt write in general though - all bets are off in this scenario, and a hard reset may be required. I'm unsure how a corrupt write can occur with a journaled file system.
If compaction had not finished when it was stopped, then restore things to a state where compaction may begin again. This may help avoid any weird corruption due to moving files between stopping and starting. I tested this against a corrupt history file and it worked well and seems like a reasonable thing to do no matter what.
Fixes #40 - note that we don't attempt to fix reading a corrupt write in general though - all bets are off in this scenario, and a hard reset may be required. I'm unsure how a corrupt write can occur with a journaled file system.