Skip to content

Conversation

@Fokko
Copy link
Contributor

@Fokko Fokko commented Jun 17, 2025

Rationale for this change

Are these changes tested?

Are there any user-facing changes?

Copy link
Contributor

@kevinjqliu kevinjqliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pyarrow docs make it seem like there are only 2 available strategies to pick from AwsStandardS3RetryStrategy and AwsDefaultS3RetryStrategy.

retry_strategyS3RetryStrategy, default AwsStandardS3RetryStrategy(max_attempts=3)
The retry strategy to use with S3; fail after max_attempts. Available strategies are AwsStandardS3RetryStrategy, AwsDefaultS3RetryStrategy.

The __init__ function also check for the 2 classes above with isinstance
And only the given strategy classes' max_attempts field is used.
https://github.com/apache/arrow/blob/639201bfa412db26ce45e73851432018af6c945e/python/pyarrow/_s3fs.pyx#L409-L416

Given that only the max_attempts variable is used, is it still useful to expose custom S3 retry strategy?

@Fokko
Copy link
Contributor Author

Fokko commented Jun 20, 2025

@kevinjqliu I agree that that's the current state. However, there is some activity on Arrow to also add other strategies (exponential etc): apache/arrow#46517

Copy link
Contributor

@kevinjqliu kevinjqliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. This will allow us to pass in custom S3RetryStrategy class.

Note, as of pyarrow 20.0.0 only AwsStandardS3RetryStrategy and AwsDefaultS3RetryStrategy class are allowed.

https://github.com/apache/arrow/blob/639201bfa412db26ce45e73851432018af6c945e/python/pyarrow/_s3fs.pyx#L409-L416

@Fokko Fokko merged commit 910a893 into apache:main Jun 20, 2025
11 checks passed
amitgilad3 pushed a commit to amitgilad3/iceberg-python that referenced this pull request Jul 7, 2025
<!--
Thanks for opening a pull request!
-->

<!-- In the case this PR will resolve an issue, please replace
${GITHUB_ISSUE_ID} below with the actual Github issue id. -->
<!-- Closes #${GITHUB_ISSUE_ID} -->

# Rationale for this change

# Are these changes tested?

# Are there any user-facing changes?

<!-- In the case of user-facing changes, please add the changelog label.
-->
gabeiglio pushed a commit to Netflix/iceberg-python that referenced this pull request Aug 13, 2025
<!--
Thanks for opening a pull request!
-->

<!-- In the case this PR will resolve an issue, please replace
${GITHUB_ISSUE_ID} below with the actual Github issue id. -->
<!-- Closes #${GITHUB_ISSUE_ID} -->

# Rationale for this change

# Are these changes tested?

# Are there any user-facing changes?

<!-- In the case of user-facing changes, please add the changelog label.
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants