Skip to content

Commit

Permalink
store/copr: don't reset concurrency of analyze req to 2 (#40168)
Browse files Browse the repository at this point in the history
close #40162
  • Loading branch information
xuyifangreeneyes authored Dec 26, 2022
1 parent 388364d commit 8a4b31a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion store/copr/coprocessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ func (c *CopClient) BuildCopIterator(ctx context.Context, req *kv.Request, vars
// higher concurrency, the data is just cached and not consumed for a while, this increase the memory usage.
// Set concurrency to 2 can reduce the memory usage and I've tested that it does not necessarily
// decrease the performance.
if it.concurrency > 2 {
// For ReqTypeAnalyze, we keep its concurrency to avoid slow analyze(see https://github.com/pingcap/tidb/issues/40162 for details).
if it.concurrency > 2 && it.req.Tp != kv.ReqTypeAnalyze {
oldConcurrency := it.concurrency
it.concurrency = 2

Expand Down

0 comments on commit 8a4b31a

Please sign in to comment.