-
Notifications
You must be signed in to change notification settings - Fork 3
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: RocksDB implementation for File Manager #96
Conversation
|
||
/// Get metadata for a file. | ||
fn get_metadata(&self, key: &HasherOutT<T>) -> Result<FileMetadata, FileStorageError>; | ||
|
||
// TODO: check if this method is necessary and what is its use case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather we simplify the trait api to only include a single insert
method. Right now we have insert_file
and insert_file_with_data
.
IMO we want to abstract away the internal logic and architecture of the file manager from services and tasks. Do you think we could have only an insert_file
fn (which does not force services and tasks to create a preliminary trie with FileDataTrie
to finally call insert_file_with_data
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree this would help making things less confusing, but you'd have to be careful that you can still serve the use case of the RPC of user uploads file, and the BSP receives file handler that gets chunk by chunk.
3fe1939
to
eb3ce4a
Compare
30322b0
to
6563a8c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job overall!
Probably most of the comments I left could be put as TODOs, but I think there is some work to
do on the structure of file manager and file trie.
|
||
/// Get metadata for a file. | ||
fn get_metadata(&self, key: &HasherOutT<T>) -> Result<FileMetadata, FileStorageError>; | ||
|
||
// TODO: check if this method is necessary and what is its use case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree this would help making things less confusing, but you'd have to be careful that you can still serve the use case of the RPC of user uploads file, and the BSP receives file handler that gets chunk by chunk.
Adds a RocksDB implementation for File Storage.
Next steps in a new PR:
FileStorage
andFileDataTrie
interfaces to allow:StorageDb
, ditch theBackend
trait and thus avoid locking access (RwLock
) within the File Manager.