gitoria

mpackdb

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitcde6b275cde6b2751.0.8: validate indexes against the data file on open, atomic index writes, invalidate index state before compaction; tests for pk find after compaction and hard killmrecde6b275/CHANGELOG.md

1.2 KB

  1. # Changelog
  2. ## 1.0.8
  3. - Index recovery hardening (einicherai#6). Indexes are no longer trusted blindly on open: the index files are
  4. checked against the data file (every line parses, ends inside the data file / covered range, and a sample of
  5. entries points at a record whose size header matches). A stale, torn or foreign index is rebuilt from the data file.
  6. - Index files are written atomically (tmp + rename); a crash while persisting can no longer leave a torn index.
  7. - Compaction removes the index state file *before* swapping the data file, so a crash between the swap and the
  8. index rebuild forces a rebuild on the next open.
  9. - Regression tests: `tests/index-recovery.test.js` (+ `tests/repro-bug1-compaction-pk.mjs`, `tests/repro-bug2-hardkill.mjs`).
  10. - Stores written by 1.0.6 (wrong pk offsets after compaction -> "Data read, but end of buffer not reached";
  11. indexes not persisted after a hard kill) open and are repaired automatically; no record is lost.
  12. - Note: 1.0.7 already fixed both reported symptoms for stores it rebuilt (index rebuild after compaction, `idxstate.json`
  13. catch-up of the unpersisted data tail). Upgrade from 1.0.6 is the actual fix for the report.
  14. ## 1.0.7
  15. - Multi-process safety, index catch-up (`idxstate.json`), stale lock takeover, index hints.

Branches

Latest commits

  • cde6b2751.0.8: validate indexes against the data file on open, atomic index writes, invalidate index state before compaction; tests for pk find after compaction and hard killmre
  • 87888725release 1.0.7caramboleyo
  • c4cdb9b6node: import prefixes (Deno compat) + pre-existing index-state WIPcaramboleyo
  • 0afb8f4bupdate now must be a callbackcaramboleyo
  • cde73eb4release 1.0.6caramboleyo
  • d01dda02add index hints, intersection, boundingBox; remove findByIndexcaramboleyo
  • b8ffc1a0release 1.0.5caramboleyo
  • d47876a1reimplemented lost features like indexed find and more testscaramboleyo
  • 7f08da9afixed insert ignoring model definitioncaramboleyo
  • 705774a9added flush before findcaramboleyo
  • b4db6391initial commitcaramboleyo