-
Notifications
You must be signed in to change notification settings - Fork 2
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
Simplify shard manager #157
Conversation
…ile-manager-simplified
@@ -110,8 +112,10 @@ impl XorbUpload for ParallelXorbUploader { | |||
upload_tasks.spawn_on( | |||
async move { | |||
let ret = upload_and_register_xorb(item, shard_manager, cas, cas_prefix).await; | |||
if let Some(updater) = upload_progress_updater { | |||
updater.update(xorb_data_len as u64); | |||
if ret.is_ok() { |
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.
This was a minor typo that I found debugging...
target_shard_min_size: u64, | ||
chunk_dedup_disabled: bool, | ||
chunk_dedup_enabled: bool, |
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.
This is an easier name...
@@ -165,7 +169,8 @@ async fn upload_and_register_xorb( | |||
(*hash, pos as u32) | |||
}) | |||
.collect(); | |||
cas.put(&cas_prefix, &cas_hash, data, chunk_and_boundaries).await?; | |||
// XXXXXX |
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.
rm this comment?
@@ -185,7 +190,8 @@ async fn upload_and_register_xorb( | |||
.collect(); | |||
let cas_info = MDBCASInfo { metadata, chunks }; | |||
|
|||
shard_manager.add_cas_block(cas_info).await?; | |||
// XXXXXXX |
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.
rm this comment?
This PR simplifies parts of the shard manager and adds some tests; it currently doesn't contain any significant functional changes.