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



##########
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:
       I opted to pass around a struct containing the error code and a couple 
of other fields from the AWS error object. I looked into StatusDetail, but I 
don't think it'll work in this case since there's several fields that are 
important in deciding whether or not something should be retried (For example, 
`ConnectRetryStrategy` uses both `ShouldRetry()` and `GetExceptionName()`)




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