Skip to content

Legacy 3.x: schema-change backup cannot finish on large converted histories #1302

Open

Description

@frahlg

Release scope (2026-10-06)

This finding concerns the retired 3.x updater and its large-history schema transition. It remains open for any future guided migration or schema-change backup work.

It does not block a same-schema native 0.x release. The native release workflow rejects a schema change in scripts/check-native-schema.py, and go/internal/nativeupdate/slots.go refuses to stage a candidate whose state schema differs from the current slot. These guards are present in v0.139.4-beta.1. The current native line uses schema 7; its backup-and-restore path for a schema change has not shipped.

The release-blocker label applies to promotion of a supported line. It has been removed here because 2.x/3.x publication is retired and this issue does not establish a defect in the supported same-schema native path. The original failure and required migration evidence remain below.

Observed upgrade failure path

The owner started an update from v3.5.3-beta.1 to v3.6.0-beta.1 at 2026-09-17 17:11:04 UTC. After more than 2,023 seconds, Core still reports snapshotting, step 1/4, Copying full history database. The updater has not begun pulling or recreating Core. The current Core still runs v3.5.3-beta.1.

Two read-only measurements of the unpublished raw backup show slow progress, not completion:

  • 17:47:39 UTC: 637,317,120 bytes.
  • 17:48:12 UTC: 641,384,448 bytes.
  • About 4.07 MB in 33 seconds, or 0.123 MB/s during this interval. This is not a completion estimate.

The primary history file is 6,731,206,656 bytes and its WAL about 769 MB. The live health snapshot reported all accepted telemetry committed, zero rejected and no pending ticks, but logs during the backup also contain history-commit timeouts with retry and state SQLITE_BUSY errors. Core continues planning. A fresh status heartbeat is therefore not proof that backup throughput is adequate.

Cause in the installed source

At v3.5.3-beta.1, exportHistoryToSQLite has a two-hour deadline and calls copyHistoryTablePaced with pauseMaintenance. copyVerifiedTable commits at most 1,024 rows (or 256 KiB) before each 100 ms pause, then reads each copied table again for verification. The recorded converted dataset in #1259 has 174,629,397 sample rows: mandatory pauses alone exceed 4h44m, before copy, sync, index and verification costs. Any workload above roughly 73.7 million rows cannot fit this deadline from pauses alone.

The offline-helper fix in #1261 does not repair this running old-Core update path. The new version cannot supply its fixes until the old version finishes the mandatory schema-change backup. v3.6.0-beta.1 still retains live pacing; smaller future history does not solve this first transition.

Required behavior and tests

  • Provide a safe upgrade path for existing large histories, with verified rollback material. Do not add a silent skip-backup route or discard migration originals.
  • Detect an export that cannot fit its deadline before spending hours on it. Use a coherent bounded backup strategy rather than forcing every history row through this paced rebuild during a schema-change update.
  • Report table/rows/bytes and actual progress during the copy phase; distinguish heartbeat from progress. Define cancellation and resumable retry behavior.
  • Test upgrade from the exact previous beta with a representative converted history, concurrent live writes, backup verification and restore, preserved goals/identity and bounded control latency. Unit tests and the new offline helper alone do not cover this path.

Track separately from #1259 (offline helper) and #1246 (durable-goal latency under backup). Related umbrella: #140; retention transition: #1287. No update interruption, deployment, cleanup or data removal was performed during this diagnosis.

Activity

  1. added
    release-blocker
    on Sep 17, 2026
  2. removed
    release-blocker
    on Oct 6, 2026
  3. changed the title [-]selfupdate: schema-change backup cannot finish on large converted histories[/-] [+]Legacy 3.x: schema-change backup cannot finish on large converted histories[/+] on Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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