Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
loader: fix load progress (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
csuzhangxc authored Mar 23, 2019
1 parent b57feb4 commit a8e91c0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions loader/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,10 @@ func (l *Loader) IsFreshTask() (bool, error) {

// Restore begins the restore process.
func (l *Loader) Restore(ctx context.Context) error {
// reset some counter used to calculate progress
l.totalDataSize.Set(0)
l.finishedDataSize.Set(0) // reset before load from checkpoint

if err := l.prepare(); err != nil {
log.Errorf("[loader] scan dir[%s] failed, err[%v]", l.cfg.Dir, err)
return errors.Trace(err)
Expand Down

0 comments on commit a8e91c0

Please sign in to comment.