File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -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,28 @@ 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) => StoreBuilder :: S3 (
112+ s. with_http_connector ( FetchConnector )
113+ . with_retry ( no_retry) ,
114+ ) ,
104115 #[ cfg( feature = "azure" ) ]
105- StoreBuilder :: Azure ( a) => StoreBuilder :: Azure ( a. with_http_connector ( FetchConnector ) ) ,
116+ StoreBuilder :: Azure ( a) => StoreBuilder :: Azure (
117+ a. with_http_connector ( FetchConnector )
118+ . with_retry ( no_retry) ,
119+ ) ,
106120 #[ cfg( feature = "gcp" ) ]
107- StoreBuilder :: Gcs ( g) => StoreBuilder :: Gcs ( g. with_http_connector ( FetchConnector ) ) ,
121+ StoreBuilder :: Gcs ( g) => StoreBuilder :: Gcs (
122+ g. with_http_connector ( FetchConnector )
123+ . with_retry ( no_retry) ,
124+ ) ,
108125 } ;
109126 builder. build ( )
110127 }
You can’t perform that action at this time.
0 commit comments