Skip to content

Document Store - closing resources #1628

Description

@davidsbatista

In most document stores, we establish a connection with some resource but never explicitly close it or destroy it; most of the clients we wrap in our document stores (e.g., ElasticSearch, Mongo, Chroma, etc.) have an init()/connect() and also a close() method.

We could add a method that is triggered when the doc store is destroyed (e.g., based on del), and then release all the allocated resources and established connections.

For more controlled cleanup, we can also consider adding an explicit close() method that users can call when they're done with the document store.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions