Skip to content

Commit

Permalink
Merge branch 'master' into test_tso
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkingrei authored Jul 21, 2022
2 parents 609d1d6 + 2a93509 commit 78b43ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ddl/ddl.go
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ func (d *ddl) prepareWorkers4ConcurrencyDDL() {
}
}
// reorg worker count at least 1 at most 10.
reorgCnt := mathutil.Min(mathutil.Max(runtime.NumCPU()/4, 1), reorgWorkerCnt)
reorgCnt := mathutil.Min(mathutil.Max(runtime.GOMAXPROCS(0)/4, 1), reorgWorkerCnt)
d.reorgWorkerPool = newDDLWorkerPool(pools.NewResourcePool(workerFactory(addIdxWorker), reorgCnt, reorgCnt, 0), reorg)
d.generalDDLWorkerPool = newDDLWorkerPool(pools.NewResourcePool(workerFactory(generalWorker), generalWorkerCnt, generalWorkerCnt, 0), general)
failpoint.Inject("NoDDLDispatchLoop", func(val failpoint.Value) {
Expand Down

0 comments on commit 78b43ad

Please sign in to comment.