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

syncer: improve performance #594

Merged
merged 14 commits into from
Apr 12, 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
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
WangXiangUSTC marked this conversation as resolved.
Show resolved Hide resolved
)

// 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