Open PD-Pramila opened 1 year ago
By default BadgerDB uses a lock to prevent more than one process from accessing the DB, regardless if it's for reading or writing. I'd recommend using a single service instance (this will limit horizontal scalability unfortunately) and just have different internal goroutines for the various read or write jobs.
I'm in the middle of creating an instance/network accessible "wrapper" DB around BadgerDB called Redpanda that uses https://github.com/tauraamui/kvs underneath to facilitate the data storage and loading, but until I release that the above is what I recommend.
I set the read only option but still it says can not lock the dir. I want to open DB for one write process and multiple read processes. Is it supported?