tustvold commented on code in PR #4040:
URL: https://github.com/apache/arrow-rs/pull/4040#discussion_r1161309686
##########
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:
It is worth highlighting that this only spawns the code that generates the
Response, the Response streaming can and will take place in the calling
context. This is perfectly acceptable as the mio reactor registration will have
occurred already, the futures plumbing is runtime agnostic
--
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]