What version of Go are you using (
$ go version go version go1.13.15 darwin/amd64
What operating system are you using?
macOS big sur 11.0.1
What version of Badger are you using?
Does this issue reproduce with the latest master?
What Badger options were set?
Hi there, I’ve been trying badgerDB in one of my projects.
Basically I have some object A that contains a db reference and will create write transactions, etc.
However, at any time, there could be a user who will trigger an event to get rid of object A. This in turns should trigger a db’s close and terminates any on going db work.
However, some of the db work is done in the background and won’t be tracked.
If such background work tries to use a write transaction while the db is already closed, we will get a panic in the application.
Therefore, I am wondering if there is a way to say detect that
connection is closed, don’t panic in those background work, but just clean up and exit gracefully?
As a comparison, If I use sqlite3 as my db store instead, I will just get connection closed error in the background work logic and can exit cleanly.