Skip to content

Commit

Permalink
syncer: improve performance (pingcap#594)
Browse files Browse the repository at this point in the history
  • Loading branch information
csuzhangxc committed Apr 15, 2020
1 parent 9b85963 commit 795e3ea
Show file tree
Hide file tree
Showing 9 changed files with 686 additions and 235 deletions.
4 changes: 4 additions & 0 deletions dm/config/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ var (
// SyncerConfig
defaultWorkerCount = 16
defaultBatch = 100
defaultQueueSize = 5120
)

// Meta represents binlog's meta pos
Expand Down Expand Up @@ -204,6 +205,8 @@ type SyncerConfig struct {
MetaFile string `yaml:"meta-file" toml:"meta-file" json:"meta-file"` // meta filename, used only when load SubConfig directly
WorkerCount int `yaml:"worker-count" toml:"worker-count" json:"worker-count"`
Batch int `yaml:"batch" toml:"batch" json:"batch"`
QueueSize int `yaml:"queue-size" toml:"queue-size" json:"queue-size"`

// deprecated
MaxRetry int `yaml:"max-retry" toml:"max-retry" json:"max-retry"`

Expand All @@ -219,6 +222,7 @@ func defaultSyncerConfig() SyncerConfig {
return SyncerConfig{
WorkerCount: defaultWorkerCount,
Batch: defaultBatch,
QueueSize: defaultQueueSize,
}
}

Expand Down
Loading

0 comments on commit 795e3ea

Please sign in to comment.