Skip to content

Commit

Permalink
it's printf debugging time
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbornholt committed Mar 5, 2024
1 parent 129aa18 commit 3181cc4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions mountpoint-s3-client/src/s3_crt_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,10 @@ impl S3CrtClientInner {
let ttfb = metrics.time_to_first_byte();
let range = metrics.response_headers().and_then(|headers| extract_range_header(&headers));

if request_type == "AbortMultipartUpload" {
println!("AbortMultipartUpload {metrics:?} in span {span_telemetry:?}");
}

let message = if request_failure {
"CRT request failed"
} else if request_canceled {
Expand Down
8 changes: 6 additions & 2 deletions mountpoint-s3-client/tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,16 @@ pub async fn get_mpu_count_for_key(
) -> Result<usize, SdkError<ListMultipartUploadsError, HttpResponse>> {
// This could be broken if we have initiated more than one multipart upload using the same key
// since ListMultipartUploads returns all multipart uploads for that key.
let upload_count = client
let uploads = client
.list_multipart_uploads()
.bucket(bucket)
.prefix(prefix)
.send()
.await?
.await?;

println!("uploads {uploads:?} for {bucket:?}/{prefix:?}/{key:?}");

let upload_count = uploads
.uploads()
.iter()
.filter(|&u| u.key() == Some(key))
Expand Down

0 comments on commit 3181cc4

Please sign in to comment.