Skip to content

v0.3.7

Choose a tag to compare

@github-actions github-actions released this 16 Nov 13:00
db9e476

This version adds the checked open of an event log. The change is backward compatible.

  • openCheckedEventLog(path, parse, options) opens a log in its own file after an integrity check. The default check is quick_check.
  • The result is a tagged union with the kinds created, opened, recovered and orphan-journal. Its type is CheckedEventLog.
  • A broken file goes into quarantine, and a new file gets each readable event. The field salvage has the counts kept and lost.
  • A WAL, SHM or journal file with no database file goes into quarantine. The function does not put that WAL into a new file.
  • Each step of the recovery can be done again. The record <path>.recovery.json keeps the quarantine folder and the counts across a crash.
  • A test stops the recovery after each step and opens the file again. The events and the quarantine are the same as after a recovery with no stop.
  • listRecoveries(path) gives each recovery from the records in the quarantine folders, in the sequence of at and then of id.
  • The id of an entry is the name of its quarantine folder. A caller can report each recovery at each start with this id, and a grow-only log keeps one report.
  • A folder with no record, or with a record that does not parse, gives an entry of the kind no-read. A recovery that is not complete is not in the list.
  • The types CheckedEventLogOptions, RecoveryCause, RecoveryEntry and SalvageCounts are new.

Runtime dependencies: none.