Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Defined2014 committed Mar 23, 2023
1 parent 3827a80 commit b1a728c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions executor/distsql.go
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ func (e *IndexLookUpExecutor) startIndexWorker(ctx context.Context, workCh chan<
SetMemTracker(tracker).
SetConnID(e.ctx.GetSessionVars().ConnectionID)

results := make([]distsql.SelectResult, len(kvRanges))
results := make([]distsql.SelectResult, 0, len(kvRanges))
pids := make([]int64, 0, len(kvRanges))
for partTblIdx, kvRange := range kvRanges {
// check if executor is closed
Expand Down Expand Up @@ -690,7 +690,7 @@ func (e *IndexLookUpExecutor) startIndexWorker(ctx context.Context, workCh chan<
worker.syncErr(err)
break
}
results[partTblIdx] = result
results = append(results, result)
worker.batchSize = initBatchSize
if worker.batchSize > worker.maxBatchSize {
worker.batchSize = worker.maxBatchSize
Expand Down

0 comments on commit b1a728c

Please sign in to comment.