montydb
montydb copied to clipboard
Permission denied with empty collections on LMDB
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.
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
Hi, thanks for the quick feedback, I could prevent the creation of the collection completely on my side but the workaround is appreciated.