fix(startup): Handle an unusual startup recovery bug.

The code that checked whether a Store was in need of recovery at startup incorrectly trusted the structure of a Chunk when it was invalid due to an apprent bit flip. This turned out to be a result of what appears to have been a crash in between the first chunk being written to disk with a new generation number and the snapshot being partially written before the flush was completed. This uncovered a couple of flaws in the code that determines whether a Store needs recovery, even through the underlying issue appears to have been a flip of the least significant bit.

Merge request reports

Loading