Skip to content

Commit

Permalink
executor: AnalyzePartitionConcurrency is not more than number of task
Browse files Browse the repository at this point in the history
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
  • Loading branch information
hawkingrei committed Oct 8, 2023
1 parent 869c425 commit ff2f8c4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions executor/analyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,8 @@ func (e *AnalyzeExec) handleResultsError(
resultsCh <-chan *statistics.AnalyzeResults,
) error {
partitionStatsConcurrency := e.Ctx().GetSessionVars().AnalyzePartitionConcurrency
// the concurrency of handleResultsError cannot be more than partitionStatsConcurrency
partitionStatsConcurrency = min(concurrency, partitionStatsConcurrency)
// If partitionStatsConcurrency > 1, we will try to demand extra session from Domain to save Analyze results in concurrency.
// If there is no extra session we can use, we will save analyze results in single-thread.
if partitionStatsConcurrency > 1 {
Expand Down

0 comments on commit ff2f8c4

Please sign in to comment.