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

Permission denied with empty collections on LMDB #60

Open
pgmillon opened this issue Jul 18, 2021 · 2 comments
Open

Permission denied with empty collections on LMDB #60

pgmillon opened this issue Jul 18, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@pgmillon
Copy link

Hi,
I've got a weird lmdb.ReadonlyError: mdb_dbi_open: Permission denied when using a cursor over an empty collection.

How to reproduce:

set_storage('some_file', storage='lightning')
client = MontyClient('some_file')

db = client['my_db']
db.create_collection('my_col')

db['my_col'].find().next()

Even a count raises the same error so I'm still trying to figure out a workaround.

@davidlatwe davidlatwe added the bug Something isn't working label Jul 18, 2021
@davidlatwe
Copy link
Owner

Hi @pgmillon ,

I have just tested it and able to reproduce, looks like there's something wrong when calling db.create_collection explicitly.

But should be fine if you skip that explicit collection creation. This works on my end :

set_storage('some_file', storage='lightning')
client = MontyClient('some_file')
db = client['my_db']
db['my_col'].find().next()
# raise StopIteration

@pgmillon
Copy link
Author

Hi,
thanks for the quick feedback, I could prevent the creation of the collection completely on my side but the workaround is appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants