Skip to content

Offline portable backup necessarily times out on large migrated histories #1259

Closed

Description

@frahlg

A large converted beta installation cannot complete a portable backup through the published offline helper even when the computer and disk are fast enough.

Reproduced from the exact v3.5.1-beta.1 source and the measured dataset size:

  • exportHistoryToSQLite creates a context with a two-hour deadline.
  • It calls copyHistoryTablePaced with pauseMaintenance for every table, including in a store returned by the read-only OpenBackupSource helper.
  • copyVerifiedTable commits at most 1,024 rows before each pause.
  • maintenancePause is 100 ms.
  • The stopped household dataset contains 167,875,453 DuckDB samples plus 6,753,944 hot SQLite samples, or 174,629,397 non-overlapping sample rows.

The pauses alone take at least 17,053.6 seconds (4 hours 44 minutes). The two-hour export timeout must fire before that export can complete; no slow hardware is needed to trigger it. A two-hour window admits at most about 73.7 million rows even if copying and verification were free. The full real-data portable export has not been run to its inevitable two-hour timeout.

Expected: keep protection for live collection and control while allowing the separate offline backup helper to use the available computer without live-work pacing. Do not merely increase the global timeout or remove live safeguards. Preserve bounded memory, full readback, integrity checks, verified archive publication and restore checks. Also preflight space for the raw export, compressed archive and verification extraction.

Relevant paths at release e0d6e23:

  • go/internal/state/history_sqlite.go: exportHistoryToSQLite, copyVerifiedTable.
  • go/internal/state/parquet_stream.go: maintenancePause, pauseMaintenance.
  • go/internal/state/store.go: OpenBackupSource.

Acceptance: cover the offline/live distinction with tests, benchmark a large offline export, verify and restore its complete archive, and retain the existing live goal-save/control latency tests. Do not delete pre-migration originals until a valid post-migration backup and restore have passed.

Related: #1246 concerns live backup I/O and goal-save latency; this report concerns the offline helper's guaranteed timeout for large datasets.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions