tustvold commented on code in PR #5538:
URL: https://github.com/apache/arrow-rs/pull/5538#discussion_r1533197424


##########
object_store/src/client/retry.rs:
##########
@@ -172,25 +173,37 @@ pub trait RetryExt {
     /// # Panic
     ///
     /// This will panic if the request body is a stream
-    fn send_retry(self, config: &RetryConfig) -> BoxFuture<'static, 
Result<Response>>;
+    fn send_retry(
+        self,
+        config: &RetryConfig,
+        payload: Option<PutPayload>,
+    ) -> BoxFuture<'static, Result<Response>>;
 }
 
 impl RetryExt for reqwest::RequestBuilder {
-    fn send_retry(self, config: &RetryConfig) -> BoxFuture<'static, 
Result<Response>> {
+    fn send_retry(
+        self,
+        config: &RetryConfig,
+        payload: Option<PutPayload>,
+    ) -> BoxFuture<'static, Result<Response>> {
         let mut backoff = Backoff::new(&config.backoff);
         let max_retries = config.max_retries;
         let retry_timeout = config.retry_timeout;
 
-        let (client, req) = self.build_split();
-        let req = req.expect("request must be valid");
-
         async move {
             let mut retries = 0;
             let now = Instant::now();
 
             loop {
-                let s = req.try_clone().expect("request body must be 
cloneable");
-                match client.execute(s).await {
+                let mut s = self.try_clone().expect("request body must be 
cloneable");

Review Comment:
   We defer setting the body until this point when we have a streaming body, as 
otherwise this would fail



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to