Skip to content

Commit

Permalink
Only increment S3 request count on successful request
Browse files Browse the repository at this point in the history
  • Loading branch information
darunrs committed Nov 12, 2024
1 parent 43477fb commit bc9baee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions block-streamer/src/lake_s3_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@ impl LakeS3Client {
let prefix = prefix.to_owned();

async move {
metrics::LAKE_S3_GET_REQUEST_COUNT.inc();

let object = s3_client.get_object(&bucket, &prefix).await?;

let bytes = object.body.collect().await?.into_bytes().to_vec();

metrics::LAKE_S3_GET_REQUEST_COUNT.inc();

Ok(bytes)
}
.boxed()
Expand Down

0 comments on commit bc9baee

Please sign in to comment.