diff --git a/dbm-services/mysql/db-tools/dbactuator/pkg/components/spiderctl/import_schema_from_backend.go b/dbm-services/mysql/db-tools/dbactuator/pkg/components/spiderctl/import_schema_from_backend.go index 499542078..4bdff805f 100644 --- a/dbm-services/mysql/db-tools/dbactuator/pkg/components/spiderctl/import_schema_from_backend.go +++ b/dbm-services/mysql/db-tools/dbactuator/pkg/components/spiderctl/import_schema_from_backend.go @@ -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 { diff --git a/dbm-services/mysql/db-tools/dbactuator/pkg/util/mysqlutil/mysql_dumper.go b/dbm-services/mysql/db-tools/dbactuator/pkg/util/mysqlutil/mysql_dumper.go index 3b6234303..9fff60500 100644 --- a/dbm-services/mysql/db-tools/dbactuator/pkg/util/mysqlutil/mysql_dumper.go +++ b/dbm-services/mysql/db-tools/dbactuator/pkg/util/mysqlutil/mysql_dumper.go @@ -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}