On delete rocksdb waits for the background thread to finish.
However the background threads needs the GIL to execute python-code
(for example comparator)
=>
* main thread has GIL
* main thread waits for background thread
* background thread tries to get GIL
which means deadlock
For better logging I'm going to inject the rocksdb info_logger into the C++ Wrapper classes
=> The classes on the options object have a member to a DB specific logger
=> This c++ classes can only belong to a SINGLE db
=> For simplicity make this requirement also for the options object itself
The cyclic garbage collector may choose this snappshot object to break the
cycle. In that case tp_clear will remove the reference to self.db.
So if __dealloc__ of the snapshot is called, self.db is not valid anymore