Open msk opened 3 months ago
Let's move forward with this evaluation by creating a dedicated branch for the transition to redb
.
Create a redb
Branch:
redb
, which will serve as the base for all changes related to the migration from rocksdb
to redb
.main
branch will continue to incorporate any necessary updates to review-database
, while the redb
branch will focus on the migration effort.Gradual Migration with native_db
redb
:
redb
branch, we will start by gradually adding the code required to migrate data from rocksdb
to redb
.native_db
crate to facilitate this process, particularly focusing on its migration features.redb
currently lacks.Testing and Performance Evaluation:
redb
in our typical workloads and the reliability of the custom backup and restore processes.PR Management and Rebase Strategy:
redb
migration will be targeted to the redb
branch.redb
branch up-to-date with the latest changes in main
, we will periodically rebase redb
on top of main
.Final Transition:
redb
is complete and the stability of the system has been thoroughly verified, we will merge the redb
branch back into main
.review-database
that fully replaces rocksdb
with redb
.
redb
is a pure Rust implementation of a key-value database, which could bring several advantages to our project:redb
is written entirely in Rust, it eliminates the long compile times and large disk space usage associated withrocksdb
due to its C++ dependencies.redb
outperforms RocksDB in most operations, except for bulk writing. Given that bulk writing isn't a critical operation for review-database, this trade-off might be acceptable.I also found another crate callednative_db
that builds on top ofredb
. It offers features like migration, which could simplify our database management.However, it’s important to note that neither
redb
nornative_db
provides built-in backup and restore features. We will need to manually implement and test these features to ensure they meet our performance and reliability requirements.Next Steps:
redb
's performance in the context ofreview-database
, focusing on its integration with our current workflows.native_db
and assess their utility.rocksdb
toredb
, including potential challenges and strategies for mitigation.Update (on 2024-08-29):
redb
andnative_db
.