Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Add an async interface #822

Open
junderw opened this issue Oct 1, 2023 · 2 comments
Open

Feature Request: Add an async interface #822

junderw opened this issue Oct 1, 2023 · 2 comments

Comments

@junderw
Copy link

junderw commented Oct 1, 2023

It would be nice to wrap rocksdb in an async interface so that it could be used in an async context without blocking the async worker threads.

@zaidoon1
Copy link
Contributor

zaidoon1 commented Oct 2, 2023

I think this is relevant to you #687, specifically #687 (comment)

I've had the same problem and ended up using spawn_blocking for all rocksdb operations so that I don't block the async runtime. I'm still new to rust but I think that's the best/only option right now?

@junderw
Copy link
Author

junderw commented Oct 2, 2023

I think this issue is even more relevant. facebook/rocksdb#11017

Since this Rust library is only a wrapper around the C++ library, it would be hard to setup something using mio etc. unless the underlying library can make use of epoll and kqueue etc.


ended up using spawn_blocking for all rocksdb operations so that I don't block the async runtime.

There is also block_in_place which is less restrictive and more performant in most cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants