Hello.
When I use the Badger database and make a query, I close the database at the end of all the code.
defer db.Close() //golang code
If the program fails before the end, the database loses all records. How can this be avoided if I need to make requests several times, and in the end write the result to the database?
The Dgraph has a LOCK file for this situation. http://discuss.dgraph.io/t/crash-replicas-and-recover/2965/4?u=vladimir
Regards.
I add time.Sleep to code.
If I interrupt the execution of the program, I get lost data and an error accessing the database. Value log truncate required to run DB. This might result in data loss.