Skip to content

Commit

Permalink
Move part-size back
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Tan <hahadaxigua@gmail.com>
  • Loading branch information
crrow committed Jul 29, 2024
1 parent 28cd400 commit 945a2c8
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions mountpoint-s3/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -636,19 +636,11 @@ pub fn create_s3_client(args: &CliArgs) -> anyhow::Result<(S3CrtClient, EventLoo
user_agent.key_value("mp-cache-ttl", &ttl.to_string());
}

let (read_part_size, write_part_size) = match (args.read_part_size, args.write_part_size) {
(None, None) => (args.part_size, args.part_size),
_ => (
args.read_part_size.unwrap_or(args.part_size),
args.write_part_size.unwrap_or(args.part_size),
),
};

let mut client_config = S3ClientConfig::new()
.auth_config(auth_config)
.throughput_target_gbps(throughput_target_gbps)
.read_part_size(read_part_size as usize)
.write_part_size(write_part_size as usize)
.read_part_size(args.read_part_size.unwrap_or(args.part_size) as usize)
.write_part_size(args.write_part_size.unwrap_or(args.part_size) as usize)
.user_agent(user_agent);
if args.requester_pays {
client_config = client_config.request_payer("requester");
Expand Down

0 comments on commit 945a2c8

Please sign in to comment.