* expose memtable flush
This can be used to avoid log replays on startup, for example
* Add flush to RocksDbReadWriteRef.
* Remove atomic flush default.
---------
Co-authored-by: bhartnett <51288821+bhartnett@users.noreply.github.com>
There was already the earlier strange ` before the
"unity.a' is up to date message on macOS.
Turns out it might still not work on macOS because of certain
verbosity levels.
So use the question option instead of dry-run + grep as the
latter is more brittle, and the former is intended for this
purpose.
* Add support for optimistic transaction db.
* Add keyMayExist to RocksDbRef.
* Add support for write batch with index.
* Allow empty keys to be used in API.
* Update readme.
* Add additional opts getters and setters for ReadOptionsRef and WriteOptionsRef. Updated BackupEngineOptionsRef to use newer c library type.
* Add majority of option type getter and setters.
* Revert some changes from prior PR https://github.com/status-im/nim-rocksdb/pull/48 which enable memory leak of options when not cleaned up manually.
* Clean up, add more tests and use correct free function for listColumnFamilies.
* Close opt types when opening database fails.
* Add autoClose flag to each opt type.
* Finish autoClose changes to prevent memory leaks.
* Refactor API to pass in column family handle instead of string.
* Check for unknown column family in getColFamilyHandle and update tests.
* Update column family function names. Remove redundant exists check.
Several options were mistakenly classified as db options when in fact
they are column family options - the C interface does not make this
distinction and instead puts them all under one umbrella.
This PR updates options to use nim setter/getter properties allowing
both read and write of most options - lots of options are exposed both
for reading and writing, but hey, one could always add _even more_ of
them - there's certainly no lack!
* Expose function for listing existing column families
* Free CF list after use
* Update, fix error case
* Rename listRocksDbCFs -> listColumnFamilies
* Need to free each item separately
* Handle default option objects, close after use
* Added rocksdb as a submodule in vendor directory.
* Add support for static linking using nimble.
* Add script to build static library dependencies.
* Disable warnings as error in deps build.
* Set recommended compression options in build and in library.
* Move static linking into wrapper code.
* Conditionally set linker using when defined(macosx).
* Add support for linking windows static libraries.
* Build rocksdb static libs using vcpkg.
* Remove lib prefix from library names for windows.
* Static linking is not supported on windows. Update documentation and CI.
* Column families support (#34)
* Update library to support column families. If not specified, uses the 'default' column family.
* Added tests for column family changes.
* Update library version and readme.
* Updated the librocksdb c library to the latest stable version.
* Started rewrite of library.
* Commit library rewrite progress.
* Completed initial rewrite and refactored tests.
* Completed implementation of backup engine.
* Added tests for new types.
* Completed tests for existing features.
* Remove features not supported by older versions of RocksDB to fix CI (temporary fix).
* Remove flush before backup support from BackupEngine to fix CI.
* Transactions support (#36)
* Update library to support column families. If not specified, uses the 'default' column family.
* Added tests for column family changes.
* Update library version and readme.
* Updated the librocksdb c library to the latest stable version.
* Started rewrite of library.
* Commit library rewrite progress.
* Completed initial rewrite and refactored tests.
* Completed implementation of backup engine.
* Added tests for new types.
* Completed tests for existing features.
* Remove features not supported by older versions of RocksDB to fix CI (temporary fix).
* Remove flush before backup support from BackupEngine to fix CI.
* Implemented RocksDB iterator.
* Implemented pairs iterator.
* Completed implementation of WriteBatch with tests.
* Fix example code.
* Completed implementation of TransactionDb.
* Support setting default column family.
* Remove unneeded usage of var for ref type parameters.
* Completed transactiondb tests.
* Improve and refactor rocksdb test.
* Added support for ingesting sst files using the SstFileWriter. (#37)
* Create ColFamilyReadOnly and ColFamilyReadWrite types for using a specific column family.
* Use inline pragma for small procs and add lock to RocksDbRef type close to prevent double free.
* Added documentation for the public API.
* Initial implementation of sst filewriter.
* Added tests for sstfilewriter.
* Documentation minor improvements.
* Made del return a bool, and added clear.
What I've done here feels very awkward. Maybe I'm missing something,
but it looks to me like RocksDB doesn't support these operations in
any natural way.
These changes were made in order to get our implementation of
KvStoreRef for RocksDB working again after these changes to the
KvStoreRef interface:
8f0ae55353
I don't really recommend merging this; I think I'd prefer to just stop
trying to use this common KvStoreRef interface.
Still, if we do want to keep the common interface, I think this commit
will work well enough.
* Updated the tests to expect del to return a bool too.
* Leave the new `clear` operation unimplemented.