-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
affects-8.1This bug affects the 8.1.x(LTS) versions.This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.This bug affects the 8.5.x(LTS) versions.severity/minorsig/executionSIG executionSIG executiontype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
When NewExecutorWithRetry returns error, the mpp coordinator may have been already created inside mppExec and registered in global MPPCoordinatorManager map:
tidb/pkg/executor/mpp_gather.go
Lines 104 to 108 in 907eddd
if e.mppExec, err = mpp.NewExecutorWithRetry(ctx, e.Ctx(), e.memTracker, planIDs, e.originalPlan, e.startTS, e.mppQueryID, e.is); err != nil { | |
return err | |
} | |
e.kvRanges = e.mppExec.KVRanges | |
e.respIter = distsql.GenSelectResultFromMPPResponse(e.Ctx().GetDistSQLCtx(), e.RetFieldTypes(), planIDs, e.ID(), e.mppExec) |
The mpp coordinator resource will not be released even when MPPGather is closed, because mppExec will be closed only when respIter is not nil:
tidb/pkg/executor/mpp_gather.go
Lines 133 to 135 in 907eddd
if e.respIter != nil { | |
return e.respIter.Close() | |
} |
Metadata
Metadata
Assignees
Labels
affects-8.1This bug affects the 8.1.x(LTS) versions.This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.This bug affects the 8.5.x(LTS) versions.severity/minorsig/executionSIG executionSIG executiontype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.