Skip to content

Commit

Permalink
fix reset tracker
Browse files Browse the repository at this point in the history
Signed-off-by: guo-shaoge <shaoge1994@163.com>
  • Loading branch information
guo-shaoge committed Feb 19, 2024
1 parent 578ee22 commit 9c00311
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/executor/cte.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,10 @@ func (p *cteProducer) closeProducer() (firstErr error) {
firstErr = setFirstErr(firstErr, err, "deref iterOutTbl err")
}
}
p.resetTracker()
// Reset to nil instead of calling Detach(),
// because ExplainExec still needs tracker to get mem usage info.
p.memTracker = nil
p.diskTracker = nil
p.closed = true
return
}
Expand Down

0 comments on commit 9c00311

Please sign in to comment.