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

feat: Add support for rust-rocksdb storage engine #284

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

creatorrr
Copy link
Contributor

@creatorrr creatorrr commented Nov 16, 2024

  • wip: Add support for rust-rocksdb storage engine

https://crates.io/crates/rocksdb

@creatorrr creatorrr marked this pull request as draft November 16, 2024 19:17
@creatorrr
Copy link
Contributor Author

Comments / thoughts @zh217 ?

@keitharobertson
Copy link
Contributor

I'm doing some testing and this is working for me and even fixed a bug with the rocksdb windows thread shutdown

@creatorrr
Copy link
Contributor Author

@keitharobertson I’m not sure why the tests are failing though. Haven’t had a chance to sit and debug. Maybe I missed something?

}

#[test]
fn test_range_operations() -> Result<()> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test does not work for the old rocks implementation either. The problem is it is attempting to seek for the key with values (appended to the keys) included in the encoded prefix, which causes it to skip the first result. I can put a PR up with a fix, but it is unrelated to your implementation here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha

Copy link
Contributor

@keitharobertson keitharobertson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job finding bugs with the tests

Fix thanks to @keitharobertson

Co-authored-by: Keith Robertson <[email protected]>
@creatorrr
Copy link
Contributor Author

Thanks @keitharobertson! This is awesome. Committed your suggested changes. Another question is naming? storage-new-rocksdb and new-* seem weird to me… Maybe we can switch to rocksdb for the new one and rename the original to cozorocks-* ?

@zh217 what do you think?

@creatorrr creatorrr changed the title wip: Add support for rust-rocksdb storage engine feat: Add support for rust-rocksdb storage engine Nov 26, 2024
@creatorrr creatorrr marked this pull request as ready for review November 26, 2024 03:04
@keitharobertson
Copy link
Contributor

Thanks @keitharobertson! This is awesome. Committed your suggested changes. Another question is naming? storage-new-rocksdb and new-* seem weird to me… Maybe we can switch to rocksdb for the new one and rename the original to cozorocks-* ?

@zh217 what do you think?

Renaming the old one to cozorocks would be a breaking change so we probably don't want to do that. It is a different major version of rocks so maybe storage-rocksdb-9?

@creatorrr
Copy link
Contributor Author

It won't be a breaking change at the cozoscript level though, right? I like rocksdb-9 naming scheme though.

@keitharobertson
Copy link
Contributor

It won't be a breaking change at the cozoscript level though, right? I like rocksdb-9 naming scheme though.

yeah- I think it would only matter in Cargo.toml

@creatorrr
Copy link
Contributor Author

yeah- I think it would only matter in Cargo.toml

Actually I think in cozo-bin, we might have to add a new flag too

@zh217 zh217 merged commit b0549df into cozodb:main Nov 26, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

3 participants