Open hawkingrei opened 1 month ago
I think the reason is MemTracker
is shared across the statements in a session:
It is introduce to reduce object allocations in PR #26064
However, the background goroutine in coprocessor may still be running after the previous statement finished, and every time a statement starts, StmtCtx
will be reset:
Does it mean we should not reuse the MemTracker
? @tiancaiamao could you take a look?
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)