Skip to content

Commit

Permalink
lightning: log error cause when SampleFileCompressRatio fail (#57455)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyangyu authored Nov 18, 2024
1 parent 140525d commit 06ac7b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/lightning/mydump/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,8 @@ func (s *mdLoaderSetup) constructFileInfo(ctx context.Context, path string, size
compressRatio, err2 := SampleFileCompressRatio(ctx, info.FileMeta, s.loader.GetStore())
if err2 != nil {
logger.Error("fail to calculate data file compress ratio", zap.String("category", "loader"),
zap.String("schema", res.Schema), zap.String("table", res.Name), zap.Stringer("type", res.Type))
zap.String("schema", res.Schema), zap.String("table", res.Name),
zap.Stringer("type", res.Type), zap.Error(err2))
} else {
info.FileMeta.RealSize = int64(compressRatio * float64(info.FileMeta.FileSize))
}
Expand Down

0 comments on commit 06ac7b1

Please sign in to comment.