@@ -28,7 +28,7 @@ use futures::{StreamExt, TryStreamExt};
2828use object_store:: aws:: { AmazonS3 , AmazonS3Builder , AmazonS3ConfigKey , Checksum } ;
2929use object_store:: limit:: LimitStore ;
3030use object_store:: path:: Path as StorePath ;
31- use object_store:: { ClientOptions , ObjectStore , PutPayload } ;
31+ use object_store:: { BackoffConfig , ClientOptions , ObjectStore , PutPayload , RetryConfig } ;
3232use relative_path:: { RelativePath , RelativePathBuf } ;
3333
3434use std:: collections:: BTreeMap ;
@@ -218,13 +218,19 @@ impl S3Config {
218218 if self . skip_tls {
219219 client_options = client_options. with_allow_invalid_certificates ( true )
220220 }
221+ let retry_config = RetryConfig {
222+ max_retries : 5 ,
223+ retry_timeout : Duration :: from_secs ( 30 ) ,
224+ backoff : BackoffConfig :: default ( ) ,
225+ } ;
221226
222227 let mut builder = AmazonS3Builder :: new ( )
223228 . with_region ( & self . region )
224229 . with_endpoint ( & self . endpoint_url )
225230 . with_bucket_name ( & self . bucket_name )
226231 . with_virtual_hosted_style_request ( !self . use_path_style )
227- . with_allow_http ( true ) ;
232+ . with_allow_http ( true )
233+ . with_retry ( retry_config) ;
228234
229235 if self . set_checksum {
230236 builder = builder. with_checksum_algorithm ( Checksum :: SHA256 )
0 commit comments