Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Advanced Rust bindings for RocksDB

NotificationsYou must be signed in to change notification settings

elastio/roxide

Repository files navigation

This repo containsroxide, Elastio's Rust bindings for RocksDB.

Roxide sits on top of our fork ofrust-rocksdb, providing a moreergonomic Rust API and a lot of functionality missing inrust-rocksdb (transactions, logging, async, and a lot more).

Development Tasks

How to Update to a New RocksDB

  • Update the linked RocksDB version. See theroxide-librocksdb-sys/README.md file for instructions
  • Update the build metadata in the semver version of all three crates, to reflect the current RocksDB version. Forexample, if the new RocksDB version is 5.6.7, add+rocksdb.5.6.7 as the build metadata to the version inCargo.toml forroxide,roxide-rocksdb, androxide-librocksdb-sys
  • Consider publishing a new release of these crates so that other projects can take advantage of this new version

Note that the version numbers fromrust-rocksdb were reset when we make a fork. That project set the version oflibrocksdb-sys to correspond with the version of RocksDB that it wrapped, but we don't do that.

Required Dependencies

  • This requiresliburing be present to enable async I/O support. On Fedora that's theliburing-devel package.

WIP - Async Support

When updating to RocksDB 8.1, I tried to add support for asyncMultiGet. Unfortunately I failed, but I left all ofthe pieces in place in the hopes that some brave soul can finish this work later.

The featuerio_uring in roxide and in lower-level crates sets #defines to enable this in RocksDB. However the RocksDBdocs are clear that async support inMultiGet requires the Facebook C++radioactive dumpster fire frameworkfolly in order to function. I tried for days to get that piece of shit to compile and link cleanly on both a localdev system and our CI system, with no success.

So I left theio_uring feature in place (just know that it doesn't actually enable asyncMultiGet, but it mightenable async iterators, the docs are ambiguous), but I commented out thefolly feature because otherwise--all-features builds would fail. I left in place inbuild.rs thebuild_folly method (conditional on thefollly) feature being enabled), but what's in that function doesn't work right. I could not get it to compile andlink cleanly.

folly uses a python script (yes really) to wrap all of the contortions required to compile it. There is an option toinstall dependencies, and that option can either download and compile from source the dependencies, or try to installsystem packages. Then there's another option in the Pythong script to build folly, and that can optionally try to usesystem pacakges for deps or not. Neither of these options worked.

I tried to use thepkg-config entry that is in the Folly code forlibfolly, but it must not be used by facebookbecause it's missing many of the dependencies that libfolly actually has. I tried explicitly adding these one at a timebut that didn't work either, because then I ran into problems with the include paths forfmt, conflicting between thelocally installed Fedora package (which is apparently old), and the latest and greatest built from source.

All of this was just not worth it, especially since we have no idea if any of that async crap will actually lead toa measurable performance improvement.

Credits

The original authors and maintainers ofrust-rocksdb built thefoundation upon whichroxide was based. While we no longer follow this project, it's likely Roxide would have takena much different form without the base ofrust-rocksdb upon which to grow.

About

Advanced Rust bindings for RocksDB

Resources

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp