Skip to main content

Durability

--durability says what an accepted write survives. The server answers 200 only after that. A restart replays the write log. The crash tests (kill -9 in the middle of writes, with checked answers) are in docs/FINDINGS.md F17. A live demo of one: docs/DEMO.md, step 7.
On macOS, disk flushes with F_FULLFSYNC. It is slow, and it slows every other writer on the machine.

Upgrades and the store version

A store has a format version. The file store.json in the folder holds it, and so does each commit. Every build checks it before it changes a byte (the “door”). A build opens only a store of its own version. It refuses an older or a newer one, and says what to do:
The last sentence is a general note of the import; here no server runs. A server, the Node package and the Python package refuse the store with the same message. So, today:
  • Before release 1 there is no upgrade in place. A store of an older build is moved with export and import: export with the old build, import with the new one (Import, Backup).
  • A newer store in an older build is refused too, and nothing is changed: go back to the newer build.
  • A folder with files and no store.json is refused. A new store needs an empty folder.
  • The plan for upgrades in place after release 1: docs/DESIGN-UPGRADE.md (not built).