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

feat(connection): add Connection.prototype.removeDb() for removing a related connection #13580

Merged
merged 2 commits into from
Jul 10, 2023

Conversation

vkarpov15
Copy link
Collaborator

Fix #11821

Summary

Right now there's no clean way to close a useDb() connection, you have to reach into internals and remove the db from relatedDbs, etc. With this PR, removeDb() lets you permanently close a useDb() connection so it can be garbage collected: removes it from relatedDbs, otherDbs, and marks the db as force closed and destroyed, so any collection operations immediately error out.

Examples

@vkarpov15 vkarpov15 added this to the 7.4.0 milestone Jul 4, 2023
Co-authored-by: hasezoey <hasezoey@gmail.com>
@vkarpov15
Copy link
Collaborator Author

@hasezoey can you please re-review?

@vkarpov15 vkarpov15 merged commit 1d2c79f into 7.4 Jul 10, 2023
@hasezoey hasezoey deleted the vkarpov15/gh-11821 branch July 10, 2023 18:09
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.

2 participants