You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "crepererum (via GitHub)" <gi...@apache.org> on 2023/04/11 09:26:37 UTC

[GitHub] [arrow-rs] crepererum commented on a diff in pull request #4040: Add with_tokio_runtime to HTTP stores

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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org