Skip to content

Commit

Permalink
executor: fix an issue that index_lookup_hash_join incorrectly estima…
Browse files Browse the repository at this point in the history
…te memory usage. (#47795) (#47921)

close #47788
  • Loading branch information
ti-chi-bot authored Oct 23, 2023
1 parent 5cd4040 commit 7eb094b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion executor/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -4228,7 +4228,7 @@ func buildKvRangesForIndexJoin(ctx sessionctx.Context, tableID, indexID int64, l
memTracker.Consume(int64(2 * cap(kvRanges[0].StartKey) * len(kvRanges)))
}
if len(tmpDatumRanges) != 0 && memTracker != nil {
memTracker.Consume(2 * int64(len(tmpDatumRanges)) * types.EstimatedMemUsage(tmpDatumRanges[0].LowVal, len(tmpDatumRanges)))
memTracker.Consume(2 * types.EstimatedMemUsage(tmpDatumRanges[0].LowVal, len(tmpDatumRanges)))
}
if cwc == nil {
sort.Slice(kvRanges, func(i, j int) bool {
Expand Down

0 comments on commit 7eb094b

Please sign in to comment.