Skip to content

status: expose structured checksum progress#986

Merged
aparajon merged 2 commits into
mainfrom
aparajon/checksum-progress
Jun 25, 2026
Merged

status: expose structured checksum progress#986
aparajon merged 2 commits into
mainfrom
aparajon/checksum-progress

Conversation

@aparajon

Copy link
Copy Markdown
Collaborator

Progress carried checksum progress only inside the Summary string ("Checksum Progress=X/Y Z%"), so programmatic consumers (e.g. a control plane rendering per-table progress) had to parse log output to recover it.

This adds:

  • Checker.GetProgressData() (rowsChecked, rowsTotal uint64) — the structured verified/total rows, on both the single and distributed checkers.
  • status.Progress.Checksum (ChecksumProgress{RowsChecked, RowsTotal}) — populated while the migration is in the checksum phase, zero otherwise.

A shared formatChecksumProgress helper backs both GetProgress (the display string) and GetProgressData, so the two can't drift.

@aparajon aparajon force-pushed the aparajon/checksum-progress branch from 6a862a3 to 200bdce Compare June 24, 2026 01:14
Comment thread pkg/checksum/checksum.go Outdated
Progress carried checksum progress only inside the Summary string ("Checksum
Progress=X/Y Z%"), so programmatic consumers had to parse log output to recover
it. Add Checker.GetProgressRows (rows verified / total) and surface it as
status.Progress.Checksum during the checksum phase. A shared
formatChecksumProgress helper backs GetProgress and GetProgressRows so the
display string and structured data stay in sync.
@aparajon aparajon force-pushed the aparajon/checksum-progress branch from 200bdce to e9bfcd3 Compare June 25, 2026 15:08
Collapse Checker.GetProgress() and GetProgressRows() into a single
GetProgress() that returns status.ChecksumProgress. Callers that want the
display string call ChecksumProgress.String(), which now owns the
"verified/total percent" formatting. This drops the parallel string/rows
methods and the duplicated formatter, and keeps the structured data and its
display form in one place as more checker implementations are added.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@aparajon aparajon force-pushed the aparajon/checksum-progress branch from e9bfcd3 to cb18957 Compare June 25, 2026 15:31
@aparajon aparajon marked this pull request as ready for review June 25, 2026 15:52
@aparajon aparajon merged commit 3bd8ca9 into main Jun 25, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants