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

[FEATURE]: two helper methods, IsLocked() and IsDB() #2066

Open
willie68 opened this issue Jun 24, 2024 · 0 comments
Open

[FEATURE]: two helper methods, IsLocked() and IsDB() #2066

willie68 opened this issue Jun 24, 2024 · 0 comments
Labels
kind/feature Something completely new we should consider.

Comments

@willie68
Copy link

Have you tried Badger before this proposal? and did not find anything similar?

Yes

What you wanted to do.

I like to check two things,
first: check if a folder is a database folder
second: if it’s already open by another process/instance/machine

What you actually did.

I wrote two simple util methods for it, but because Windows and Unix (Linux) are quite different in handling this, it would be much more far-sighted to have an interface/API on the badger side for this.

Why wasn't it great, with examples.

In my code i have to know the implementation details of badgerDB's file layout and even have to rewrite parts of the already present but private code (reading MANIFEST file, folder locking mechanism) And it feels like a word around for the problem.

Additional information.

see: https://discuss.dgraph.io/t/how-to-check-if-a-folder-is-a-database-folder-and-if-its-already-open/19364

@willie68 willie68 added the kind/feature Something completely new we should consider. label Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Something completely new we should consider.
Development

No branches or pull requests

1 participant