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

Commit

Permalink
export: update error message for s3 fault and rows description (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
lichunzhu authored Oct 12, 2021
1 parent 0ea86cd commit b2388dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion v4/export/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ func (conf *Config) DefineFlags(flags *pflag.FlagSet) {
flags.String(flagSnapshot, "", "Snapshot position (uint64 or MySQL style string timestamp). Valid only when consistency=snapshot")
flags.BoolP(flagNoViews, "W", true, "Do not dump views")
flags.String(flagStatusAddr, ":8281", "dumpling API server and pprof addr")
flags.Uint64P(flagRows, "r", UnspecifiedSize, "Split table into chunks of this many rows, default unlimited")
flags.Uint64P(flagRows, "r", UnspecifiedSize, "If specified, dumpling will split table into chunks and concurrently dump them to different files to improve efficiency. For TiDB v3.0+, specify this will make dumpling split table with each file one TiDB region(no matter how many rows is).\n"+
"If not specified, dumpling will dump table without inner-concurrency which could be relatively slow. default unlimited")
flags.String(flagWhere, "", "Dump only selected records")
flags.Bool(flagEscapeBackslash, true, "use backslash to escape special characters")
flags.String(flagFiletype, "", "The type of export file (sql/csv)")
Expand Down
3 changes: 3 additions & 0 deletions v4/export/writer_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,9 @@ func writeBytes(tctx *tcontext.Context, writer storage.ExternalFileWriter, p []b
zap.ByteString("string", p[:outputLength]),
zap.String("writer", fmt.Sprintf("%#v", writer)),
zap.Error(err))
if strings.Contains(err.Error(), "Part number must be an integer between 1 and 10000") {
err = errors.Annotate(err, "work around: dump file exceeding 50GB, please specify -F=256MB -r=200000 to avoid this problem")
}
}
return errors.Trace(err)
}
Expand Down

0 comments on commit b2388dd

Please sign in to comment.