curiosity-ai / rocksdb-sharp

.net bindings for the rocksdb by facebook
BSD 2-Clause "Simplified" License
155 stars 38 forks source link

Add basic transaction support #47

Open codenaked opened 9 months ago

codenaked commented 9 months ago

Minimal changes to support RockDB's TransactionDb/Transaction, including some basic unit tests.

Notes:

  1. Most of the underly functionality of RocksDb was moved to RocksDbBase in order to avoid having overloads of the Open method available on TransactionDb that are actually instances of RocksDb.
  2. Several Interop methods were duplicated to support transactions. In theory, the existing methods could be updated to support another optional parameter (i.e. if a transaction handle was passed in similar to how column family handles are passed in), but to avoid confusion, new methods were added.
  3. The unit tests only work if a built copy of the RockDB library is included. There wasn't a clean way to include that for the unit tests, since they are built out-of-band.
  4. Not all Transaction methods were implemented.
  5. Support for OptimisticTransactionDb was not implemented.

Ref https://github.com/curiosity-ai/rocksdb-sharp/issues/1

codenaked commented 9 months ago

Converted to draft while we debug an issue.