diff --git a/dumpling/cmd/dumpling/main.go b/dumpling/cmd/dumpling/main.go index c6d37122..1823d92b 100644 --- a/dumpling/cmd/dumpling/main.go +++ b/dumpling/cmd/dumpling/main.go @@ -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") diff --git a/dumpling/v4/export/config.go b/dumpling/v4/export/config.go index af482eef..94ea0113 100644 --- a/dumpling/v4/export/config.go +++ b/dumpling/v4/export/config.go @@ -84,7 +84,7 @@ func DefaultConfig() *Config { Logger: nil, StatusAddr: ":8281", FileSize: UnspecifiedSize, - StatementSize: UnspecifiedSize, + StatementSize: DefaultStatementSize, OutputDirPath: ".", ServerInfo: ServerInfoUnknown, SortByPk: true, @@ -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"