Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
jiawen li
tidb
Commits
88cd7653
Unverified
Commit
88cd7653
authored
3 years ago
by
wjHuang
Committed by
GitHub
3 years ago
Browse files
Options
Download
Email Patches
Plain Diff
ddl: build sessPool even if RunWorker == false (#33677)
close pingcap/tidb#33676
parent
0c0bbbf8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ddl/ddl.go
+2
-1
ddl/ddl.go
with
2 additions
and
1 deletion
+2
-1
ddl/ddl.go
+
2
-
1
View file @
88cd7653
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help