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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to