python-rocksdb icon indicating copy to clipboard operation
python-rocksdb copied to clipboard

Update DB class implementation in cython to v6.11.4 API

Open mharshe opened this issue 3 years ago • 5 comments

Adds in missing options and functions to make it compatible with the v6.11.4 API for rocksdb.

  • Changes options classes to mimic inheritance in original classes (and thus reduced future duplication of code)
  • Adds AdvancedOptions
  • Adds the Statistics, Metadata, and Types.

Also adds commented methods to the DB class with TODO tag.

Python API is unchanged.

mharshe avatar Nov 15 '21 08:11 mharshe

This looks pretty good, and I think I had done some of the same changes a few months ago in a draft I was preparing.. But I am not sure why you say this is needed for v6.11.4, since the tests were already passing? Also, the CI is currently failing on this branch, could you rebase on top of my fixes so all tests are executed?

NightTsarina avatar Nov 15 '21 15:11 NightTsarina

What I meant to write was that this updates the classes to match the functionality of v6.11.4. Currently the cython wrappers are missing a lot of functionality and not covering the members available in the rocksdb headers. So the current version offers access to only a subset of the available API.

I've rebased the branch. The workflow is running on my fork and should be ready soon.

mharshe avatar Nov 15 '21 18:11 mharshe

(Just to further clarify, in case I'm not giving all the context needed: e are not going to squash this PR into a one single commit so its history will be directly integrated into main. Your commits are fine in the sense that they reflect the work, but commits meant for mainline need to make sense from a changelog/patch-series point of view, not a particular work path in a particular point in time.)

dato avatar Nov 16 '21 14:11 dato

Actually I do agree about cleaning up the commit history, just that I ran out of time and created this PR as is. I'll rebase/split/cleanup this on the weekend when i have the time.

The idea of this was to bring up the repo to match upstream release. My understanding is that the target release is at least 6.11.4, so the aim is to bring this up to that version, step by step, and eventually support TransactionDB.

As the changes are too many, I started with the DB class and options first. I might have to reorder the PRs because the DB class depends on many other classes/objects and options class needs to be updated first. I'll convert this to a draft PR so that it is clear that the other ones are to be looked at first.

mharshe avatar Nov 16 '21 20:11 mharshe

This PR updates the cython backend but does not change the Python API for the DB class. Some dummy methods are added but they remain commented. As the python API is unchanged, no unit tests are added for testing the DB class.

mharshe avatar Nov 29 '21 13:11 mharshe