Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue: Not able to open DB for read only #99

Open
PD-Pramila opened this issue Jul 7, 2023 · 1 comment
Open

Issue: Not able to open DB for read only #99

PD-Pramila opened this issue Jul 7, 2023 · 1 comment

Comments

@PD-Pramila
Copy link

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?

@tauraamui
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants