Unverified Commit 88cd7653 authored by wjHuang's avatar wjHuang Committed by GitHub
Browse files

ddl: build sessPool even if RunWorker == false (#33677)

close pingcap/tidb#33676
parent 0c0bbbf8
Showing with 2 additions and 1 deletion
+2 -1
......@@ -381,6 +381,8 @@ func (d *ddl) Start(ctxPool *pools.ResourcePool) error {
d.wg.Add(1)
go d.limitDDLJobs()
d.sessPool = newSessionPool(ctxPool)
// If RunWorker is true, we need campaign owner and do DDL job.
// Otherwise, we needn't do that.
if RunWorker {
......@@ -390,7 +392,6 @@ func (d *ddl) Start(ctxPool *pools.ResourcePool) error {
}
d.workers = make(map[workerType]*worker, 2)
d.sessPool = newSessionPool(ctxPool)
d.delRangeMgr = d.newDeleteRangeManager(ctxPool == nil)
d.workers[generalWorker] = newWorker(d.ctx, generalWorker, d.sessPool, d.delRangeMgr, d.ddlCtx)
d.workers[addIdxWorker] = newWorker(d.ctx, addIdxWorker, d.sessPool, d.delRangeMgr, d.ddlCtx)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment