We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please answer these questions before submitting your issue. Thanks!
create a new session and run the code snippet below:
mustExec(c.ExecContext(context.Background(), "set @@tidb_opt_fix_control='44823:0'")) mustExec(c.ExecContext(context.Background(), "create table if not exists t1 (a0 int, a1 int, a2 int, a3 int, a4 int)")) for i := 1; i <= 1000; i++ { tmp := "(?,?,?,?,?)" values := strings.Repeat(tmp+",", i-1) + tmp st, err := c.PrepareContext(context.Background(), "insert into t1 values "+values) must(err) var vals []any for k := 0; k < i*5; k++ { vals = append(vals, 1) } _, err = st.ExecContext(context.Background(), vals...) must(err) }
Then disconnect this session, trigger GO GC, take a look at the memory usage, and find the session's memory is not released:
GO GC
TiDB after #48152
It seems like this PR put every connection handle into a global list, which makes the GO GC cannot release these connections:
The text was updated successfully, but these errors were encountered:
server: register compression statistics and fix the memory leak (#49193)
7c37466
close #49190
YangKeao
Successfully merging a pull request may close this issue.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
create a new session and run the code snippet below:
Then disconnect this session, trigger

GO GC
, take a look at the memory usage, and find the session's memory is not released:2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
TiDB after #48152
5. Analysis
It seems like this PR put every connection handle into a global list, which makes the GO GC cannot release these connections:

The text was updated successfully, but these errors were encountered: