Multi-file approach not crash safe

Create issue
Issue #323 invalid
Bastian Blank created an issue

The whoosh3 format uses several files for storing different parts of the index. A crash can lead to a undefined mix of old and new index files. I see no code that could recover from this state.

There are two ways I know to fix this:

  • Use only one file and rely on rename().
  • Use the sort of redo or undo log like the real databases.

Comments (1)

  1. Matt Chaput repo owner
    1. The files are not considered part of a valid segment until the TOC file referencing them is renamed into place at the end of the process.
    2. Segments are single files by default... the different files are compiled into a single compound file at the end of the write.
  2. Log in to comment