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

Remove synchronous interfaces to RocksDB #10

Open
neysofu opened this issue May 22, 2024 · 4 comments
Open

Remove synchronous interfaces to RocksDB #10

neysofu opened this issue May 22, 2024 · 4 comments

Comments

@neysofu
Copy link
Member

neysofu commented May 22, 2024

Synchronous interfaces should arguably never be relied upon in production code, as they block the underlying Tokio runtime and can potentially cause huge performance problems. Once no one relies on the synchronous API anymore, we should remove it.

Blocked by https://github.com/Sovereign-Labs/sovereign-sdk-wip/issues/258.

@bewakes
Copy link

bewakes commented Jun 3, 2024

Hey @neysofu , is there a way I can use db iter in async fashion? I am trying to iterate inside an async function and getting issues.

@delbonis
Copy link

delbonis commented Jun 4, 2024

What if I'm not using tokio and want to use a sync API?

@neysofu
Copy link
Member Author

neysofu commented Jun 6, 2024

Hey @bewakes!

Hey @neysofu , is there a way I can use db iter in async fashion? I am trying to iterate inside an async function and getting issues.

We don't currently expose async iteration APIs and we likely will not for the foreseeable future. I suggest you block_in_place and use the synchronous APIs instead.

@neysofu
Copy link
Member Author

neysofu commented Jun 6, 2024

@delbonis we still offer synchronous APIs for now, but we are thinking of removing them entirely, as you can infer from this issue. rocksdb crate may be a better fit for you.

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

3 participants