Skip to content

Commit

Permalink
set default statement size for dumpling (pingcap#160)
Browse files Browse the repository at this point in the history
* set default statement size for dumpling
  • Loading branch information
lichunzhu authored Oct 2, 2020
1 parent bb2eb31 commit 96433a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dumpling/cmd/dumpling/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func main() {
pflag.BoolVar(&allowCleartextPasswords, "allow-cleartext-passwords", false, "Allow passwords to be sent in cleartext (warning: don't use without TLS)")
pflag.IntVarP(&threads, "threads", "t", 4, "Number of goroutines to use, default 4")
pflag.StringVarP(&fileSizeStr, "filesize", "F", "", "The approximate size of output file")
pflag.Uint64VarP(&statementSize, "statement-size", "s", export.UnspecifiedSize, "Attempted size of INSERT statement in bytes")
pflag.Uint64VarP(&statementSize, "statement-size", "s", export.DefaultStatementSize, "Attempted size of INSERT statement in bytes")
pflag.StringVarP(&outputDir, "output", "o", defaultOutputDir, "Output directory")
pflag.StringVar(&logLevel, "loglevel", "info", "Log level: {debug|info|warn|error|dpanic|panic|fatal}")
pflag.StringVarP(&logFile, "logfile", "L", "", "Log file `path`, leave empty to write to console")
Expand Down
3 changes: 2 additions & 1 deletion dumpling/v4/export/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func DefaultConfig() *Config {
Logger: nil,
StatusAddr: ":8281",
FileSize: UnspecifiedSize,
StatementSize: UnspecifiedSize,
StatementSize: DefaultStatementSize,
OutputDirPath: ".",
ServerInfo: ServerInfoUnknown,
SortByPk: true,
Expand Down Expand Up @@ -139,6 +139,7 @@ func (config *Config) createExternalStorage(ctx context.Context) (storage.Extern
const (
UnspecifiedSize = 0
DefaultTiDBMemQuotaQuery = 32 * (1 << 30)
DefaultStatementSize = 1000000
defaultDumpThreads = 128
defaultDumpGCSafePointTTL = 5 * 60
dumplingServiceSafePointID = "dumpling"
Expand Down

0 comments on commit 96433a5

Please sign in to comment.