Skip to content

Commit

Permalink
lightning: fix typo because lightning supports sql/parquet data files…
Browse files Browse the repository at this point in the history
… but csv. (#48655)

close #48654
  • Loading branch information
joccau authored Nov 17, 2023
1 parent 657f0d9 commit 557599f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions br/pkg/lightning/importer/precheck_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,22 +463,22 @@ func (ci *largeFileCheckItem) Check(_ context.Context) (*precheck.CheckResult, e
Item: ci.GetCheckItemID(),
Severity: precheck.Warn,
Passed: true,
Message: "Source csv files size is proper",
Message: "Source data files size is proper",
}

if !ci.cfg.Mydumper.StrictFormat {
for _, db := range ci.dbMetas {
for _, t := range db.Tables {
for _, f := range t.DataFiles {
if f.FileMeta.RealSize > defaultCSVSize {
theResult.Message = fmt.Sprintf("large csv: %s file exists and it will slow down import performance", f.FileMeta.Path)
theResult.Message = fmt.Sprintf("large data file: %s file exists and it will slow down import performance", f.FileMeta.Path)
theResult.Passed = false
}
}
}
}
} else {
theResult.Message = "Skip the csv size check, because config.StrictFormat is true"
theResult.Message = "Skip the data file size check, because config.StrictFormat is true"
}
return theResult, nil
}
Expand Down
6 changes: 3 additions & 3 deletions br/pkg/lightning/importer/table_import_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1388,14 +1388,14 @@ func (s *tableRestoreSuite) TestCheckHasLargeCSV() {
}{
{
true,
"(.*)Skip the csv size check, because config.StrictFormat is true(.*)",
"(.*)Skip the data file size check, because config.StrictFormat is true(.*)",
true,
0,
nil,
},
{
false,
"(.*)Source csv files size is proper(.*)",
"(.*)Source data files size is proper(.*)",
true,
0,
[]*mydump.MDDatabaseMeta{
Expand All @@ -1416,7 +1416,7 @@ func (s *tableRestoreSuite) TestCheckHasLargeCSV() {
},
{
false,
"(.*)large csv: /testPath file exists(.*)",
"(.*)large data file: /testPath file exists(.*)",
true,
1,
[]*mydump.MDDatabaseMeta{
Expand Down

0 comments on commit 557599f

Please sign in to comment.