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

chore: Improve RocksDB File Manager implementation #110

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

a-moreira
Copy link
Member

@a-moreira a-moreira commented Jul 1, 2024

This is part 2 of #96, continuing the implementation of RocksDB with some improvements:

  • Remove Backend<T> trait, which was created so we could use a MockStorageDb in unit tests for File and Forest managers. Now we use kvdb_memorydb::InMemory instead, which makes the code simpler.
  • Remove unnecessary RwLock<_> from the File Storage.
  • Remove the now obsolete nextest.toml config file, along with the serial_test crate, both used to run the FileStorage tests in sequence instead of in parallel.

@a-moreira a-moreira marked this pull request as ready for review July 1, 2024 18:00
Copy link
Contributor

@links234 links234 left a comment

Choose a reason for hiding this comment

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

Nice!

@@ -42,35 +42,14 @@ fn open_or_creating_rocksdb(db_path: String) -> io::Result<Database> {
}

/// Storage backend for RocksDB.
pub struct StorageDb<Hasher> {
pub struct StorageDb<T> {
pub db: Arc<dyn KeyValueDB>,
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this dyn be removed somehow or is it overcomplicating too much?

pallets/proofs-dealer/src/utils.rs Show resolved Hide resolved
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.

None yet

2 participants