Skip to content

Commit 805a121

Browse files
author
ffffwh
committed
dump progress: replace estimated total with real copied value
when complete.
1 parent 0f0c97b commit 805a121

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

driver/mysql/applier.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1199,7 +1199,12 @@ func (a *Applier) updateDumpProgressLoop() {
11991199
return
12001200
}
12011201

1202-
err = a.storeManager.PutDumpProgress(a.subject, a.TotalRowsReplayed, a.mysqlContext.RowsEstimate)
1202+
exec := a.TotalRowsReplayed
1203+
total := a.mysqlContext.RowsEstimate
1204+
if total < exec || a.stage == JobIncrCopy {
1205+
total = exec
1206+
}
1207+
err = a.storeManager.PutDumpProgress(a.subject, exec, total)
12031208
if err != nil {
12041209
a.onError(common.TaskStateDead, err)
12051210
return

0 commit comments

Comments
 (0)