crepererum commented on code in PR #4040:
URL: https://github.com/apache/arrow-rs/pull/4040#discussion_r1162541501


##########
object_store/src/client/retry.rs:
##########
@@ -190,26 +252,36 @@ impl RetryExt for reqwest::RequestBuilder {
                             tokio::time::sleep(sleep).await;
                         }
                     },
-                    Err(e) =>
-                    {
-                        return Err(Error{
+                    Err(e) => {
+                        return Err(Error::Retry(RetryError {
                             retries,
                             message: "request error".to_string(),
-                            source: Some(e)
-                        })
+                            source: Some(e),
+                        }))
                     }
                 }
             }
+        };
+
+        match config.runtime.as_ref() {
+            Some(handle) => handle
+                .spawn(fut)

Review Comment:
   I'm not sure I follow your argument here. The underlying socket is 
registered w/ the IO runtime and so is the mio reactor. However we still 
cross-poll. So is our assumption that when polling data from the IO runtime to 
which mio just has written to, mio will never change its mind and "jump" to 
another runtime?



##########
object_store/src/client/retry.rs:
##########
@@ -190,26 +252,36 @@ impl RetryExt for reqwest::RequestBuilder {
                             tokio::time::sleep(sleep).await;
                         }
                     },
-                    Err(e) =>
-                    {
-                        return Err(Error{
+                    Err(e) => {
+                        return Err(Error::Retry(RetryError {
                             retries,
                             message: "request error".to_string(),
-                            source: Some(e)
-                        })
+                            source: Some(e),
+                        }))
                     }
                 }
             }
+        };
+
+        match config.runtime.as_ref() {
+            Some(handle) => handle
+                .spawn(fut)

Review Comment:
   Might be worth to put your entire comment in code as a code comment.



-- 
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