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(core): switch database to Redb #1351

Merged
merged 26 commits into from
Nov 29, 2024
Merged

feat(core): switch database to Redb #1351

merged 26 commits into from
Nov 29, 2024

Conversation

jrchatruc
Copy link
Collaborator

Motivation

Description

Closes #738

@jrchatruc jrchatruc requested a review from a team as a code owner November 28, 2024 22:31
@@ -580,6 +609,45 @@ impl Encodable for ChainDataIndex {
}
}

impl redb::Value for ChainDataIndex {
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't have code necessary for the redb impl in a module gated behind the libmdbx feature, maybe we could move ChainDataIndex outside this module ( to engine or engine/utils) and only keep implementation-specific code here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agreed, I moved the ChainDataIndex enum to its own utils module under engines here dbf7bdd

Copy link
Contributor

@fmoletta fmoletta left a comment

Choose a reason for hiding this comment

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

In the storage module we have tests that run the full test suite against the different engine implementations, we should add one for redb too. We just need to add this test:

#[test]
    fn test_redb_store() {
        test_store_suite(EngineType::Redb);
    }

@jrchatruc
Copy link
Collaborator Author

In the storage module we have tests that run the full test suite against the different engine implementations, we should add one for redb too. We just need to add this test:

#[test]
    fn test_redb_store() {
        test_store_suite(EngineType::Redb);
    }

Nice!, added the test here 404f388

Copy link
Contributor

@ilitteri ilitteri left a comment

Choose a reason for hiding this comment

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

LGTM

@jrchatruc jrchatruc added this pull request to the merge queue Nov 29, 2024
Merged via the queue into main with commit 93847ca Nov 29, 2024
12 checks passed
@jrchatruc jrchatruc deleted the move-to-redb branch November 29, 2024 22:25
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.

Replace Libmdbx with an alternative
3 participants