Skip to content

Commit d109bf0

Browse files
authored
executor: fix wrong statistic from memory tracker in hash agg (#60653) (#61228)
close #58822
1 parent 48a94ab commit d109bf0

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

pkg/executor/aggregate/agg_hash_executor.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,7 @@ func (e *HashAggExec) fetchChildData(ctx context.Context, waitGroup *sync.WaitGr
480480
}
481481
waitGroup.Done()
482482
}()
483+
483484
for {
484485
select {
485486
case <-e.finishCh:

pkg/executor/aggregate/agg_hash_partial_worker.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,7 @@ func (w *HashAggPartialWorker) fetchChunkAndProcess(ctx sessionctx.Context, hasE
100100

101101
w.intestDuringPartialWorkerRun()
102102

103-
sizeBefore := w.chk.MemoryUsage()
104103
w.chk.SwapColumns(chk)
105-
w.memTracker.Consume(w.chk.MemoryUsage() - sizeBefore)
106-
107104
w.giveBackCh <- &HashAggInput{
108105
chk: chk,
109106
giveBackCh: w.inputCh,

0 commit comments

Comments
 (0)