Closed getavinashm closed 5 years ago
Too busy right now.; just guessing. Maybe is related with append-only format. https://github.com/antoniopresto/react-native-local-mongodb#persistence
You can manually call the compaction function with
yourDatabase.persistence.compactDatafile
which takes no argument. It queues a compaction of the datafile in the executor, to be executed sequentially after all pending operations. The datastore will fire a compaction.done event once compaction is finished.
Feel free to reopen if you believe it is a bug in this lib.
Hi, I am having issues with the data not persisting after the app crashes or is force closed for some reason. I have seen issue #24 but that is related to chrome debugging and my problem is not with chrome debugging. I have working code that adds data to the db and fetches it perfectly fine. However, when the app crashes or I force close it and relaunch the app, the data is all gone. Here is the code snippet for how the db is created...... I have a wrapper function called 'createCollection' and the 'config' constant has the configuration as per documentation.