-
Notifications
You must be signed in to change notification settings - Fork 1
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
Split layers according to size threshold-Push side #3
base: main
Are you sure you want to change the base?
Conversation
.vscode/launch.json
Outdated
@@ -0,0 +1,45 @@ | |||
{ |
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.
add .vscode to gitignore so we don't need to commit this file
src/planner.rs
Outdated
} | ||
|
||
impl ConexPlanner { | ||
pub fn default() -> Self { | ||
Self { | ||
layer_to_files: Vec::new(), | ||
//30 mb threshold | ||
split_threshold: 30 * 1024 * 1024, |
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.
can this be passed in through CLI. this means it needs to be part of default()
arguments, and then passed in through the Clap App in main.rs
.
src/planner.rs
Outdated
}); | ||
} | ||
} | ||
//println!("ingested total size {}",total_size.to_string()); |
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.
//println!("ingested total size {}",total_size.to_string()); |
src/planner.rs
Outdated
let mut segment_idx = 0; | ||
let mut remainder_size = file.size; | ||
while remainder_size != 0 { | ||
//println!("remainder size {}",remainder_size.to_string()); |
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.
//println!("remainder size {}",remainder_size.to_string()); |
src/planner.rs
Outdated
if frag.hard_link_to.is_some() { | ||
//soft links don't count | ||
current_layer_size += remainder_size; | ||
} |
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.
let's test this. i don't think this will do it because we want any file that's a link to occupy 0 bytes of space of content. because both hard link and softlinks are pointers.
How do run end to end testing:
|
How to inspect local "blobs". The blobs are in zstd compressed tar format. The way to depress them is to
tar has native support for zstd
tar can let you list the directory without untarring them
|
Showing the fixes to the threshold