GH-46507: [C++] Make the aws sdk S3 lowSpeedLimit configurable from arrow S3Options #46506
+12
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rationale for this change
In extreme cases, a slow network response response from S3, Minio, etc will result in arrow returning curlCode: 28 timeout errors even before the request_timeout period has elapsed. This is because there is an additional setting used in the awssdk known as the lowSpeedLimit (used in the curl library) to abort the transfer if the transfer rate drops below some value (by default 1 byte / second). In such a case the user may want to disable this lowSpeedLimit to allow their reads to succeed despite the slow network throughputs.
What changes are included in this PR?
add the low_speed_limit option to S3Options, and then include them in the client_config_ if they are >=0
< 0
will use the default setting from the s3 sdk (like other options)0
disables the lowSpeedLimit> 0
will set the lowSpeedLimit to N bytes / sAre these changes tested?
They are tested our fork in arrow 13.0.0.0 but I have not tested with the latest code, as I'm unable to build main in my environment (it looks like a new build dependency on ninja was added and I'm not able to install it at the moment on my system). I have opened this PR via a clean cherry-pick of my changes.
Are there any user-facing changes?
No, these settings are for advanced users of the C++ sdk with S3FS