Free trial
Colour

Recovery after a crash, a power cut or a half finished update

What Pop Dispatch guarantees when the power fails during a save, a sync, an update, an import or a backup, and what to do on the next start.

For
OwnerAdministrator
Hosting
Any hosting
Devices
All devices
Business
All businesses

Checked against Pop Dispatch 0.1.0

Pop Dispatch is built so that a sudden stop never costs you data. You will be able to start again after a power cut and know what to expect.

Before you start #

Nothing needs preparing. These checks run on every release.

What happens in each case #

  1. Power cut during a save. The save is all or nothing. On the next start the work is either whole or absent. Retry it; the server recognises a repeat and does it once.
  2. Power cut during a sync. A change that was sent but not confirmed is sent again after a short wait and counted once.
  3. Power cut during an update. The update works on a copy of the database. The copy is only swapped in at the end, so the old version starts with its data. Run the update again.
  4. Power cut during an import. The whole file goes in as one step. A file cut off halfway adds nothing. Run the import again.
  5. Power cut during a backup. A half written backup is never listed as a backup. It is cleaned up on the next start.
  6. Hard reset of the computer. Everything saved before the stop is there. If the very last write was torn, that last save is absent as a whole and the audit log stays in order.

On the next start #

The server checks the database before it opens. If it finds a problem, it opens read-only in safe mode and shows the banner. See "Safe mode, crashes and the Restored your last session bar" and "Backups and restoring".

Technical details
  • Kill points tested on every build: mid_job, post_commit_pre_ack, mid_backup, mid_sync, mid_update_pre_promote, mid_update_pre_swap, mid_update_swap, hard_reset, a torn write-ahead log, and mid_import at row 2,500 of 5,000.
  • After each, the integrity check passes, no partial rows exist and a retry completes once.

If something goes wrong #