lidavidm commented on a change in pull request #10877:
URL: https://github.com/apache/arrow/pull/10877#discussion_r683758372



##########
File path: cpp/src/arrow/filesystem/s3fs.cc
##########
@@ -483,6 +484,29 @@ std::string FormatRange(int64_t start, int64_t length) {
   return ss.str();
 }
 
+// An AWS RetryStrategy that wraps a provided arrow::fs::S3RetryStrategy
+class WrappedRetryStrategy : public Aws::Client::RetryStrategy {
+ public:
+  explicit WrappedRetryStrategy(const std::shared_ptr<S3RetryStrategy>& 
s3_retry_strategy)
+      : s3_retry_strategy_(s3_retry_strategy) {}
+
+  bool ShouldRetry(const Aws::Client::AWSError<Aws::Client::CoreErrors>& error,
+                   long attempted_retries) const override {

Review comment:
       Hmm, sorry for the back-and-forth, it appears the NOLINT was because we 
can't use `long` here. Given that this is a third party interface we're 
implementing, I think it should be OK to place a `// NOLINT runtime/int` to 
override solely this warning (rather than all of them).
   
   Below, though, we should return int64_t from the Arrow 
S3RetryStrategy::CalculateDelayBeforeNextRetry instead of long.




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