Skip to content
New issue

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

kinda goroutine leak with pgx module in awaitDone #105

Closed
Olex1313 opened this issue Jul 4, 2024 · 2 comments
Closed

kinda goroutine leak with pgx module in awaitDone #105

Olex1313 opened this issue Jul 4, 2024 · 2 comments

Comments

@Olex1313
Copy link

Olex1313 commented Jul 4, 2024

Hello, I've been using trm for my personal projects with pgx backend and found out some edge case in trm/v2/manager.go.

Apparently, when a context with external cancel function is passed in Manager.Do, the pgx implementation of a transaction relies on context either have no Done channel or getting the cancel function from manager.

It is kinda fixed in #103 due to changes inside transaction implementations, but the latest release version v2.0.0-rc8 released before it and when I vendor the v2.0.0-rc8 it still contains leak, maybe I am doing something wrong?

@Khranovskiy
Copy link
Collaborator

Hello, there are two PRs that fix known memory-related problems:

  • 103 that merged in v1 branch with a tag v1.5.0 and
  • 104 that for a main and tag v2.0.0-rc8.

I have to take several days to check if release v2.0.0-rc8 contains the same fix as 103.

@Khranovskiy
Copy link
Collaborator

Good day, Alexey!
Sorry for the long reply, I checked and the latest version v2.0.0 contains a fix for the pgx module in awaitDone memory leak, you can use this version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants