From f600a5c09f6ecbb5878703829425cd3055ef9a15 Mon Sep 17 00:00:00 2001 From: Shenghui Wu <793703860@qq.com> Date: Tue, 30 Aug 2022 11:44:23 +0800 Subject: [PATCH] executor: check memory limit before expand string set in HashAgg (#37298) ref pingcap/tidb#35635 --- executor/aggregate.go | 1 + util/set/set_with_memory_usage.go | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/executor/aggregate.go b/executor/aggregate.go index f492c0c49e7bd..f505049149e65 100644 --- a/executor/aggregate.go +++ b/executor/aggregate.go @@ -418,6 +418,7 @@ func (e *HashAggExec) initForParallelExec(_ sessionctx.Context) { } // There is a bucket in the empty partialResultsMap. e.memTracker.Consume(hack.DefBucketMemoryUsageForMapStrToSlice*(1< (1<