diff --git a/dm/loader/loader.go b/dm/loader/loader.go index ae03d03876c..3731a943984 100644 --- a/dm/loader/loader.go +++ b/dm/loader/loader.go @@ -222,7 +222,7 @@ func (w *Worker) run(ctx context.Context, fileJobQueue chan *fileJob, runFatalCh continue } // update finished offset after checkpoint updated - w.loader.finishedDataSize.Store(job.offset) + w.loader.finishedDataSize.Add(job.offset - job.lastOffset) if _, ok := w.loader.dbTableDataFinishedSize[job.sourceSchema]; ok { if _, ok := w.loader.dbTableDataFinishedSize[job.sourceSchema][job.sourceTable]; ok { w.loader.dbTableDataFinishedSize[job.sourceSchema][job.sourceTable].Store(job.offset)