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

mongodb: fix goroutine leak on failed server connections #3538

Merged

Conversation

lrascao
Copy link
Contributor

@lrascao lrascao commented Sep 10, 2024

Description

By not keeping the client when Ping fails we're later unable to properly invoke Disconnect which leads to leaked resources, most notably goroutines created on the mongo-go-driver.

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]

@lrascao lrascao requested review from a team as code owners September 10, 2024 19:03
By not keeping the client when `Ping` fails we're later unable to
properly invoke `Disconnect` which leads to leaked resources, most
notably goroutines created on the mongo-go-driver.

Signed-off-by: Luis Rascao <[email protected]>
@lrascao lrascao force-pushed the fix-mongodb-goroutine-leak-on-failed-connection branch from 4be7052 to f99f664 Compare September 10, 2024 19:03
@yaron2 yaron2 merged commit 3830b41 into dapr:main Sep 10, 2024
89 checks passed
@lrascao lrascao deleted the fix-mongodb-goroutine-leak-on-failed-connection branch September 11, 2024 08:58
@marcduiker
Copy link
Contributor

@holopin-bot @lrascao Thank you for your contribution, Luis!

Copy link

holopin-bot bot commented Oct 4, 2024

Congratulations @lrascao, the maintainer of this repository has issued you a badge! Here it is: https://holopin.io/claim/cm1ukyq5k82110cm8alj3rmep

This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account.
Or if you're new to Holopin, you can simply sign up with GitHub, which will do the trick!

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

Successfully merging this pull request may close these issues.

4 participants