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

The disconnect is not implemented for mongodb adapter. #1084

Closed
tatejones opened this issue Jul 12, 2024 · 3 comments
Closed

The disconnect is not implemented for mongodb adapter. #1084

tatejones opened this issue Jul 12, 2024 · 3 comments

Comments

@tatejones
Copy link
Contributor

tatejones commented Jul 12, 2024

Describe the bug
There is no way to close connections for a graceful shutdown of the keyv mongodb adapter.

How To Reproduce (best to provide workable code or tests!)

  1. Using MongoDb as keyv adaptor with disconnect called on exit interrupt
  2. terminal signal is sent to exit the node js process with a keyv mongodb running
  3. node js doesn't exit.
  4. installed wtfnode npm
  5. performed a dump to confirm sockets to 27017 are open.
@tatejones tatejones added the bug label Jul 12, 2024
@tatejones tatejones changed the title A disconnect method is required for adapters. The disconnect is not implemented for mongodb adapter. Jul 12, 2024
@jaredwray jaredwray added enhancement and removed bug labels Jul 15, 2024
@jaredwray
Copy link
Owner

@tatejones - Hi. That is correct that mongo does not have this feature. Happy to take a pull request on this or I will leave it to see if others want to upvote this with a 👍

tatejones pushed a commit to tatejones/keyv that referenced this issue Jul 15, 2024
@tatejones
Copy link
Contributor Author

A pull request has been issued. The MongodbClient needed to be exposed on the KeyvMongoConnect type to allow the disconnect to method to access the close() method.

jaredwray pushed a commit that referenced this issue Jul 16, 2024
…n. (#1085)

Co-authored-by: Tate Jones <tate.jones@health.qld.gov.au>
@jaredwray
Copy link
Owner

Thanks for the pull request. This has been merged and should be released in the next couple weeks.

jaredwray pushed a commit that referenced this issue Jul 17, 2024
* #1084 Implement disconnect for mongodb adapter for a graceful shutdown.

* #1087 Support iterator on MongoDb adatper with GridFS enabled.

* Handle namespace not found on MongoDB adapter with GridFS

---------

Signed-off-by: tatejones <tate@bluedog.com.au>
Co-authored-by: Tate Jones <tate.jones@health.qld.gov.au>
jaredwray added a commit that referenced this issue Jul 18, 2024
…nabled) (#1089)

* #1084 Implement disconnect for mongodb adapter for a graceful shutdown.

* #1087 Support iterator on MongoDb adatper with GridFS enabled.

* Handle namespace not found on MongoDB adapter with GridFS

---------

Signed-off-by: tatejones <tate@bluedog.com.au>
Co-authored-by: Tate Jones <tate.jones@health.qld.gov.au>
Co-authored-by: Jared Wray <me@jaredwray.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants