Closed g5becks closed 1 year ago
No there's no possibility to close a Datastore. However you can do the following:
Datastore#stopAutocompaction
to make sure no interval is set to compact the DatastoreDatastore#compactDatafileAsync
to make sure all changes are persisted to disk and compacted.Datastore
and it should be automatically garbage collected.
Hi, is there was a way to close a datastore? I looked around the api couldn't find an answer.
I have a situation where I am trying to conserve memory in my process and have - say 8 Datastores open at once, I would like to be able to close them and reopen them as needed at a later time.
Thanks.