Skip to content

Commit 1e88dbd

Browse files
author
Shlomi Noach
authored
Merge pull request #171 from github/empty-table-progress
progress is 100% when 0/0 rows copied
2 parents 4a7df07 + 7e9f578 commit 1e88dbd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

go/logic/migrator.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,9 @@ func (this *Migrator) printStatus(rule PrintStatusRule, writers ...io.Writer) {
941941
totalRowsCopied := this.migrationContext.GetTotalRowsCopied()
942942
rowsEstimate := atomic.LoadInt64(&this.migrationContext.RowsEstimate)
943943
var progressPct float64
944-
if rowsEstimate > 0 {
944+
if rowsEstimate == 0 {
945+
progressPct = 100.0
946+
} else {
945947
progressPct = 100.0 * float64(totalRowsCopied) / float64(rowsEstimate)
946948
}
947949

0 commit comments

Comments
 (0)