Skip to content

Commit

Permalink
don't show the failed import on log
Browse files Browse the repository at this point in the history
Signed-off-by: Leavrth <jianjun.liao@outlook.com>
  • Loading branch information
Leavrth committed Jan 16, 2023
1 parent de6ef91 commit ac1c981
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions br/pkg/restore/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2043,19 +2043,21 @@ func (rc *Client) RestoreKVFiles(
log.Debug("skip file due to table id not matched", zap.Int64("table-id", files[0].TableId))
skipFile += len(files)
} else {
rc.workerPool.ApplyOnErrorGroup(eg, func() error {
rc.workerPool.ApplyOnErrorGroup(eg, func() (err error) {
fileStart := time.Now()
defer func() {
onProgress(int64(len(files)))
updateStats(uint64(kvCount), size)
summary.CollectInt("File", len(files))

filenames := make([]string, 0, len(files))
for _, f := range files {
filenames = append(filenames, f.Path+", ")
if err == nil {
filenames := make([]string, 0, len(files))
for _, f := range files {
filenames = append(filenames, f.Path+", ")
}
log.Info("import files done", zap.Int("batch-count", len(files)), zap.Uint64("batch-size", size),
zap.Duration("take", time.Since(fileStart)), zap.Strings("files", filenames))
}
log.Info("import files done", zap.Int("batch-count", len(files)), zap.Uint64("batch-size", size),
zap.Duration("take", time.Since(fileStart)), zap.Strings("files", filenames))
}()

return rc.fileImporter.ImportKVFiles(ectx, files, rule, rc.shiftStartTS, rc.startTS, rc.restoreTS, supportBatch)
Expand Down

0 comments on commit ac1c981

Please sign in to comment.