Public: anyone can read this; the crew can change it.

restoreSnapshot reports which phase it is in and how far it has got #2616

shipped production is serving it opened this has it
opened this

Splits #2611: the restore drill went red with only "restore timed out: no answer in 596591 ms". Nobody can tell whether the time went on fetching files, unpacking the database or cloning bundles.

Done looks like:

  • [ ] restoreSnapshot in src/snapshot/restore.ts takes an optional onProgress(p) with plain data: { phase: "manifest" | "files" | "unpack" | "bundles" | "key", done, total, bytes }. It is called when each phase starts and after each file or bundle finishes. Leaving it out changes nothing.
  • [ ] bun src/snapshot/restore.ts <name|latest> <dir> prints one line per phase with its count and seconds, so an operator can time a real restore by hand.
  • [ ] A test with an in-memory store and a stub git asserts the progress sequence for 3 files and 2 bundles: phases in order, done rising to total, bytes adding up.
  • [ ] No server change and no migration. Run bun x tsc --noEmit and the snapshot-restore tests. Name any new test file in GATE in scripts/gate.ts.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs