diff --git a/br/pkg/restore/client.go b/br/pkg/restore/client.go index c668b46115467..127ebac0bc1b4 100644 --- a/br/pkg/restore/client.go +++ b/br/pkg/restore/client.go @@ -2007,7 +2007,7 @@ func (rc *Client) RestoreKVFiles( // so we can simply skip the file that doesn't have the rule here. onProgress(int64(len(files))) summary.CollectInt("FileSkip", len(files)) - log.Debug("skip file due to table id not matched", zap.Int64("tableId", files[0].TableId)) + 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 { @@ -2016,8 +2016,16 @@ func (rc *Client) RestoreKVFiles( onProgress(int64(len(files))) updateStats(uint64(kvCount), size) summary.CollectInt("File", len(files)) - log.Info("import files done", zap.Int("batch count", len(files)), zap.Uint64("batch bytes", size), - zap.Duration("take", time.Since(fileStart))) + log.Info("import files done", zap.Int("batch-count", len(files)), + zap.Uint64("batch-size", size), zap.Duration("take", time.Since(fileStart)), + zap.Strings("filepath", func() []string { + filenames := make([]string, 0, len(files)) + for _, f := range files { + filenames = append(filenames, f.Path+"; ") + } + return filenames + }()), + ) }() return rc.fileImporter.ImportKVFiles(ectx, files, rule, rc.shiftStartTS, rc.startTS, rc.restoreTS, supportBatch) diff --git a/br/pkg/restore/import.go b/br/pkg/restore/import.go index 2c3e5fc5c5f0e..58adecd1405c3 100644 --- a/br/pkg/restore/import.go +++ b/br/pkg/restore/import.go @@ -421,11 +421,10 @@ func (importer *FileImporter) ImportKVFiles( supportBatch bool, ) error { var ( - startTime = time.Now() - startKey []byte - endKey []byte - ranges = make([]kv.KeyRange, len(files)) - err error + startKey []byte + endKey []byte + ranges = make([]kv.KeyRange, len(files)) + err error ) if !supportBatch && len(files) > 1 { @@ -464,13 +463,6 @@ func (importer *FileImporter) ImportKVFiles( } return importer.ImportKVFileForRegion(ctx, subfiles, rule, shiftStartTS, startTS, restoreTS, r, supportBatch) }) - - take := time.Since(startTime) - for _, file := range files { - log.Info("import file done", - zap.String("file", file.Path), zap.Stringer("take", take), - logutil.Key("fileStart", file.StartKey), logutil.Key("fileEnd", file.EndKey)) - } return errors.Trace(err) }