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

Commit

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

// Meta represents binlog's meta pos
Expand Down Expand Up @@ -193,6 +194,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 @@ -208,6 +211,7 @@ func defaultSyncerConfig() SyncerConfig {
return SyncerConfig{
WorkerCount: defaultWorkerCount,
Batch: defaultBatch,
QueueSize: defaultQueueSize,
}
}

Expand Down
Loading

0 comments on commit d79bfc9

Please sign in to comment.