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

[GitHub] [arrow-rs] tustvold commented on a diff in pull request #4120: Retry on all request errors.

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


##########
object_store/src/client/retry.rs:
##########
@@ -192,11 +192,20 @@ impl RetryExt for reqwest::RequestBuilder {
                     },
                     Err(e) =>
                     {
-                        return Err(Error{
-                            retries,
-                            message: "request error".to_string(),
-                            source: Some(e)
-                        })
+                        if retries == max_retries
+                            || now.elapsed() > retry_timeout
+                            || !e.is_request() {

Review Comment:
   Unless I am mistaken this will retry request and connection timeouts, along with malformed responses from the server, is this desirable?
   
   Perhaps we could do something like
   
   ```
   if let Some(e) = e.source().downcast_ref::<hyper::Error>() {
       if e.is_connect() || e.is_closed() {
           // Do retry
       }
   }
   ```
   
   This would allow limiting the potential blast radius of this change?



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