@@ -16,6 +16,7 @@ use multistore::types::BucketConfig;
1616
1717use object_store:: list:: PaginatedListStore ;
1818use object_store:: signer:: Signer ;
19+ use object_store:: RetryConfig ;
1920use std:: sync:: Arc ;
2021use worker:: Fetch ;
2122
@@ -99,12 +100,25 @@ impl ProxyBackend for WorkerBackend {
99100 & self ,
100101 config : & BucketConfig ,
101102 ) -> Result < Box < dyn PaginatedListStore > , ProxyError > {
103+ // Disable retries: object_store's retry logic uses `tokio::time::sleep`
104+ // which panics on WASM (`std::time::Instant::now` is unsupported).
105+ // See: https://github.com/apache/arrow-rs-object-store/issues/624
106+ let no_retry = RetryConfig {
107+ max_retries : 0 ,
108+ ..Default :: default ( )
109+ } ;
102110 let builder = match create_builder ( config) ? {
103- StoreBuilder :: S3 ( s) => StoreBuilder :: S3 ( s. with_http_connector ( FetchConnector ) ) ,
111+ StoreBuilder :: S3 ( s) => {
112+ StoreBuilder :: S3 ( s. with_http_connector ( FetchConnector ) . with_retry ( no_retry) )
113+ }
104114 #[ cfg( feature = "azure" ) ]
105- StoreBuilder :: Azure ( a) => StoreBuilder :: Azure ( a. with_http_connector ( FetchConnector ) ) ,
115+ StoreBuilder :: Azure ( a) => {
116+ StoreBuilder :: Azure ( a. with_http_connector ( FetchConnector ) . with_retry ( no_retry) )
117+ }
106118 #[ cfg( feature = "gcp" ) ]
107- StoreBuilder :: Gcs ( g) => StoreBuilder :: Gcs ( g. with_http_connector ( FetchConnector ) ) ,
119+ StoreBuilder :: Gcs ( g) => {
120+ StoreBuilder :: Gcs ( g. with_http_connector ( FetchConnector ) . with_retry ( no_retry) )
121+ }
108122 } ;
109123 builder. build ( )
110124 }
0 commit comments