crepererum commented on code in PR #4928:
URL: https://github.com/apache/arrow-rs/pull/4928#discussion_r1358119975
##########
object_store/src/client/mod.rs:
##########
@@ -188,6 +188,35 @@ pub struct ClientOptions {
http2_only: ConfigValue<bool>,
}
+impl Default for ClientOptions {
+ fn default() -> Self {
+ // Defaults based on
+ //
<https://docs.aws.amazon.com/sdkref/latest/guide/feature-smart-config-defaults.html>
+ //
<https://docs.aws.amazon.com/whitepapers/latest/s3-optimizing-performance-best-practices/timeouts-and-retries-for-latency-sensitive-applications.html>
+ // Which recommend a connection timeout of 3.1s and a request timeout
of 2s
+ Self {
+ user_agent: None,
+ content_type_map: Default::default(),
+ default_content_type: None,
+ default_headers: None,
+ proxy_url: None,
+ proxy_ca_certificate: None,
+ proxy_excludes: None,
+ allow_http: Default::default(),
+ allow_insecure: Default::default(),
+ timeout: Some(Duration::from_secs(5).into()),
Review Comment:
Since there are `with_{connection_}timeout` methods that accepts `Duration`
but not `None`, maybe add two new methods `with_infinite_{connection_}timeout`
and with clear doc warnings? Otherwise there is no public way to set these
options to `None`. If you NEVER want anyone to set this to `None`, then this
shouldn't be an `Option`.
--
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]