You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think is better to call db.Close function to close db. Because it is better to release the resource which is leveldb using, such as filelock, writer and reader of database file.I know what you're worried about.Don't worry, calling the close method will not cause problems with the database. The data in memory will be written to disk by WAL logging, and if you call the OpenDB method again with the same path, the data in memory will be restored to memory by reading the log.
Is db.Close() optional? My main concern is if panic could lead to a corrupt database.
The text was updated successfully, but these errors were encountered: