Skip to content

[P1][ux] BackupDialog progress UI silent on long dumps; no ETA, no rows/sec #361

Closed

Description

@EVWorth

Context

Backup feature UX. Per docs/audits/backup.md F5.

Problem

src/components/backup/BackupDialog.tsx:509-533 shows phase + currentTable/totalTables + rowsExported. For multi-minute dumps user sees no ETA, no rows/sec, no elapsed time. Progress only emitted between table boundaries, so a single multi-million-row table shows zero progress mid-table.

Files

  • src/components/backup/BackupDialog.tsx:509-533
  • src/lib/backup-generator.ts (no ETA computation)

Repro

  1. Backup a database with one 10M-row table
  2. Watch UI — only one progress event per table, no rate info

Expected

Moving rows/sec counter + ETA shown in UI.

Proposed fix

S: emit progress updates at row-batch boundaries (every insertBatchSize rows); include rowsPerSecond calculated from (rowsExported - lastEmittedRows) / elapsed. Show rate + ETA in UI.

Acceptance

1M-row table dump shows moving rows/sec counter updating at least every 2 seconds; ETA within 20% of actual over last 50%.

Needs human verify

yes

Activity

  1. added
    audit
    severity/p1
    kind/ux
    area/backup
    on Jul 31, 2026
  2. EVWorth commented on Sep 12, 2026

    @EVWorth
    OwnerAuthor

    Fixed in #652.

    Progress is emitted at row-batch boundaries rather than at table boundaries, throttled to one report every 250ms — per row would spend more time on IPC than on the dump. Each report carries:

    • rows exported and bytes written so far
    • rows a second over the last interval, not since the start: a rate averaged over an hour tells you nothing about the table being read now
    • the server's row estimate for the current table, from information_schema rather than COUNT(*) — counting every row of every table before dumping them doubles the work to draw a bar
    • elapsed time

    The dialog shows the rate, an "~4s left in this table" from the estimate, bytes written and elapsed. Three deliberate silences: no rate before there is one to show ("0 rows/s" reads as stuck), no estimate when the server has none, and no estimate once the row count passes it — TABLE_ROWS is a sample for InnoDB and is routinely under, and "-3s left" is worse than nothing. Thirteen unit tests cover those cases.

    Your acceptance criterion said a moving counter at least every 2 seconds; it updates four times a second while rows are being read.

    One thing found while doing this: TABLE_ROWS is BIGINT UNSIGNED, and decoding it as i64 failed silently, so the first version of this had no estimate at all in any report. There is now a test that asserts one arrives.

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

    area/backupauditkind/uxseverity/p1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions