lidavidm commented on a change in pull request #10877:
URL: https://github.com/apache/arrow/pull/10877#discussion_r683730535
##########
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:
Ah, the intent of StatusDetail is that you subclass it and add all the
fields you want, then you can cast it back where needed. Example:
https://github.com/apache/arrow/blob/b1f90c48bc39452c9c236a988b4bbd38fea96bae/cpp/src/arrow/flight/types.h#L81-L109
It is definitely more work to do things that way. However it may be worth
doing if you think callers outside of the retry API would care about these
error details as well.
--
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]