Skip to content

Commit ff2f8c4

Browse files
committed
executor: AnalyzePartitionConcurrency is not more than number of task
Signed-off-by: Weizhen Wang <[email protected]>
1 parent 869c425 commit ff2f8c4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

executor/analyze.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,8 @@ func (e *AnalyzeExec) handleResultsError(
355355
resultsCh <-chan *statistics.AnalyzeResults,
356356
) error {
357357
partitionStatsConcurrency := e.Ctx().GetSessionVars().AnalyzePartitionConcurrency
358+
// the concurrency of handleResultsError cannot be more than partitionStatsConcurrency
359+
partitionStatsConcurrency = min(concurrency, partitionStatsConcurrency)
358360
// If partitionStatsConcurrency > 1, we will try to demand extra session from Domain to save Analyze results in concurrency.
359361
// If there is no extra session we can use, we will save analyze results in single-thread.
360362
if partitionStatsConcurrency > 1 {

0 commit comments

Comments
 (0)