You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[P1][ux] BackupDialog progress UI silent on long dumps; no ETA, no rows/sec #361
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
Backup a database with one 10M-row table
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%.
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.
Activity
feat(backup): stream the dump and the restore, in the backend (#652)
EVWorth commentedon Sep 12, 2026
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:
information_schemarather thanCOUNT(*)— counting every row of every table before dumping them doubles the work to draw a barThe 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_ROWSis 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_ROWSisBIGINT UNSIGNED, and decoding it asi64failed silently, so the first version of this had no estimate at all in any report. There is now a test that asserts one arrives.