Closed fish2000 closed 5 years ago
@twmht I am not sure what the deal is with those failing tests – it seems to be something gone wrong with the new ColumnFamilyOptions
stuff (although I am not sure). Can you let me know if it’s something I should look at?
fixed and merged.
This is giving me segfaults and double free or corruption
errors.
While
delete rocks_ptr
is a deterministic operation in C++, the Python analoguedel rocks_handle
is not – disposal and finalization of the Rocks database are entirely dependent on the Python garbage collector (q.v. thepython-rocksdb
tests themselves, which callgc.collect()
afterdel rocks_handle
to attempt to force the destructor to run):https://github.com/twmht/python-rocksdb/blob/98910c2dce41c02aaa1745ae09e9d5fcdde34bdd/rocksdb/tests/test_db.py#L14-L21
This change exposes a method to trigger the destruction of the underlying Rocks database pointer (deterministic!) through the Python Rocks handle; existing code will not need to be changed, as the Python object destructor (non-deterministic!) will now call this method.
This is the second revision of this PR – it resolves the first revision, #39, and would close issue #10.