Comments (13)
My bad, bug seems to be inherent to my macbook dev environment rather than plyvel.
from plyvel.
I'm seeing similar issues, actually. Any clue on what might be causing this?
from plyvel.
Is the example you gave above a complete example? Did you execute any operations in between that may have resulted in references to iterators or write batches still lying around (note that write batches in a "with" block will not be deallocated automatically)?
from plyvel.
Hey, it kind of reassure me at least that you get the same problem too, 'cause I started seing it on another computer running freebsd today.
Yes this is a complete sample.
I've noticed that through unit tests, and went down to the minimal operation of creating a db connector -> releasing it -> creating a new connector to that db; which raises the problem.
from plyvel.
Tested on Linux mint, this passes:
>>> import plyvel
>>> db = plyvel.DB('default')
>>> new_db = plyvel.DB('default')
>>> db.put('1', 'a')
>>> new_db.get('1')
So I guess that in some way, python/cython, makes it possible for two DB objects working on the same db, in the same process to share the DB* pointer. (Don't ask me how, this is just an hypothesis).
On what os, python version etc did you experienced that bug?
from plyvel.
The double open support is a LevelDB bug I think. I guess it can lead to corruption even.
from plyvel.
I'm working on DB.close() btw, but it's a bit tricky due to the way things like iterator destructors work. And it requires a check in each public API method. :-(
from plyvel.
Btw, the double open issue does not reuse the pointer I think.
from plyvel.
It took some effort, but here we are: plyvel.DB has a .close () method since commit 755e000. Please review and test, since the code is a bit tricky. (Don't forget to check the API docs.)
from plyvel.
Did you have any chance to test whether the .close() API solves the problems reported earlier?
from plyvel.
Btw, the double open issue has been fixed a while back in LevelDB itself: http://code.google.com/p/leveldb/issues/detail?id=120
from plyvel.
Problem seems to be solved now.
With plyvel head at fccb583 and leveldb 1.7.1
from plyvel.
Ok, same here. Thanks for the report.
from plyvel.
Related Issues (20)
- Python 3.10 Support HOT 4
- I want to build the table-2.4.0.tar.gz dependented the library plyvel/comparator.cpp HOT 3
- Tests sometimes fail with PyPy3 HOT 9
- Duplicated values for one key still stored on disk HOT 3
- CorruptionError when open a Minecraft Bedrock‘s save data HOT 3
- Bloom filter HOT 5
- Getting number of entries HOT 1
- read-only mode HOT 2
- Support for Python 3.11 in binary wheels HOT 6
- update leveldb to v1.23 HOT 2
- compact_range ineffective? HOT 1
- PyPI binary wheels for windows, linux, osx HOT 7
- Question: Tiny amount of data backed up by 1000x filesystem contents? HOT 6
- leveldb created from large batch writes temporarily grows too much from 'compacting': lesson - compact before moving to system with low storage HOT 4
- Installation problems on Linux (Ubuntu 23.04) HOT 13
- cannot install on Windows HOT 3
- Cannot find reference (Windows) HOT 1
- Does not build against CPython 3.12 HOT 1
- cannot build plyvel(ld: library not found for -lleveldb)
- mac 14.3.1 python 3.10 can not install leveldb/db.h file not found HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plyvel.