diff --git a/src/store/object_store.rs b/src/store/object_store.rs index 9fe0425..f9b01b2 100644 --- a/src/store/object_store.rs +++ b/src/store/object_store.rs @@ -188,6 +188,7 @@ impl Store for ObjectStore { quick_xml::de::from_reader(&*body).map_err(ObjectError::from)?; let upload_id = &body.upload_id; + // hack-ish: use async block as Result boundary let res = async { let mut complete = false; let mut part_number = 0; @@ -230,6 +231,7 @@ impl Store for ObjectStore { .map_err(|_| ObjectError::Etag)? .to_string(); + // early-drop response to close its tracing spans drop(response); Ok(etag) as Result @@ -240,6 +242,9 @@ impl Store for ObjectStore { futures.push(handle); } + // early-drop stream to allow the next Part to be polled concurrently + drop(stream); + let mut etags = Vec::new(); for future in futures {