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

set default statement size for dumpling #160

Merged
merged 2 commits into from
Oct 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 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 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