You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/08/04 18:50:29 UTC

[GitHub] [arrow] neil-b commented on a change in pull request #10877: ARROW-13508: [C++] Support custom retry strategies in S3Options

neil-b commented on a change in pull request #10877:
URL: https://github.com/apache/arrow/pull/10877#discussion_r682874411



##########
File path: cpp/src/arrow/filesystem/s3fs.h
##########
@@ -69,6 +69,13 @@ enum class S3CredentialsKind : int8_t {
   WebIdentity
 };
 
+/// Pure virtual class for describing custom S3 retry strategies
+class S3RetryStrategy {
+ public:
+  virtual bool ShouldRetry(Status& error, long attempted_retries) = 0;
+  virtual long CalculateDelayBeforeNextRetry(Status& error, long attempted_retries) = 0;

Review comment:
       The `Status error` parameter itself, isn't very useful, since all S3 errors seem to result in the same IOError code. Having access to the AWS/S3 error code here would be really useful.
   Any objections to adding that as a third argument to these methods? It could be casted as an int to avoid having to include any aws headers here.




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