Skip to content

Datastores should expose Close() #97

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

Closed
raulk opened this issue Sep 18, 2018 · 3 comments
Closed

Datastores should expose Close() #97

raulk opened this issue Sep 18, 2018 · 3 comments

Comments

@raulk
Copy link
Member

raulk commented Sep 18, 2018

We should consider embedding io.Closer inside Datastore and upgrading all implementations to forward the call to the underlying closing method, as well as to perform any necessary cleanup (channels, goroutines, etc.):

@Stebalien
Copy link
Member

YES (although we shouldn't rely on it for correctness).

@kevina
Copy link
Contributor

kevina commented Oct 4, 2018

YES (although we shouldn't rely on it for correctness).

Can you be more specific?

@Stebalien
Copy link
Member

We should be able to close datastores so:

  1. We can do a clean shutdown.
  2. We can open, use, and then close a datastore without shutting down.

However, we shouldn't rely on datastores being correctly closed on shutdown (i.e., we should be able to crash).

(nothing surprising, just not very well put)

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

3 participants