Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dbm-services): 解决errchan容量太小可能触发的死锁问题 #7962 #7964

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ func (c *ImportSchemaFromBackendComp) migrateUseMysqlDump() (err error) {
Password: c.GeneralParam.RuntimeAccountParam.AdminPwd,
WorkDir: c.tmpDumpDir,
}
errChan := make(chan error)
errChan := make(chan error, len(c.dumpDbs))
wg := sync.WaitGroup{}
ctrChan := make(chan struct{}, c.maxThreads)
for _, db := range c.dumpDbs {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ func (m MySQLDumper) Dump() (err error) {
m.init()
var wg sync.WaitGroup
var errs []error
errChan := make(chan error, 1)
concurrencyControl := make(chan struct{}, m.maxConcurrency)
dumpMap := m.GetDumpFileInfo()
errChan := make(chan error, len(dumpMap))
for db, outputFileName := range dumpMap {
dumper := m
dumper.DbNames = []string{db}
Expand Down
Loading