-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
affects-8.5This bug affects the 8.5.x(LTS) versions.This bug affects the 8.5.x(LTS) versions.component/ddlThis issue is related to DDL of TiDB.This issue is related to DDL of TiDB.severity/moderatetype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
the task sender routine A uses error group context
Lines 1039 to 1040 in 889bf45
// generate task goroutine | |
eg.Go(func() error { |
but the adjust worker size routine B uses parent ctx
Lines 1074 to 1081 in 889bf45
// update the worker cnt goroutine | |
go func() { | |
ticker := time.NewTicker(UpdateDDLJobReorgCfgInterval) | |
defer ticker.Stop() | |
for { | |
select { | |
case <-ctx.Done(): | |
return |
so if A failed with error, cause error group context cancelled, B keeps running, so we might met potential data race in
tidb/pkg/ddl/backfilling_scheduler.go
Line 342 in 889bf45
closeBackfillWorkers(b.workers) |
and
tidb/pkg/ddl/backfilling_scheduler.go
Line 322 in 889bf45
b.workers = append(b.workers, runner) |
we should use the same context, and run together under the same group. introduced in #57468
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
master
Metadata
Metadata
Assignees
Labels
affects-8.5This bug affects the 8.5.x(LTS) versions.This bug affects the 8.5.x(LTS) versions.component/ddlThis issue is related to DDL of TiDB.This issue is related to DDL of TiDB.severity/moderatetype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.