File tree Expand file tree Collapse file tree 8 files changed +12
-14
lines changed Expand file tree Collapse file tree 8 files changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -318,7 +318,7 @@ async fn create_manifest(
318
318
}
319
319
320
320
pub async fn remove_manifest_from_snapshot (
321
- storage : Arc < dyn ObjectStorage + Send > ,
321
+ storage : Arc < dyn ObjectStorage > ,
322
322
stream_name : & str ,
323
323
dates : Vec < String > ,
324
324
) -> Result < Option < String > , ObjectStorageError > {
@@ -343,7 +343,7 @@ pub async fn remove_manifest_from_snapshot(
343
343
}
344
344
345
345
pub async fn get_first_event (
346
- storage : Arc < dyn ObjectStorage + Send > ,
346
+ storage : Arc < dyn ObjectStorage > ,
347
347
stream_name : & str ,
348
348
dates : Vec < String > ,
349
349
) -> Result < Option < String > , ObjectStorageError > {
Original file line number Diff line number Diff line change @@ -289,7 +289,7 @@ impl HotTierManager {
289
289
stream : & str ,
290
290
manifest_files_to_download : & mut BTreeMap < String , Vec < String > > ,
291
291
parquet_file_size : & mut u64 ,
292
- object_store : Arc < dyn ObjectStorage + Send > ,
292
+ object_store : Arc < dyn ObjectStorage > ,
293
293
) -> Result < ( ) , HotTierError > {
294
294
if manifest_files_to_download. is_empty ( ) {
295
295
return Ok ( ( ) ) ;
Original file line number Diff line number Diff line change @@ -297,7 +297,7 @@ pub async fn run_file_migration(config: &Config) -> anyhow::Result<()> {
297
297
}
298
298
299
299
async fn run_meta_file_migration (
300
- object_store : & Arc < dyn ObjectStorage + Send > ,
300
+ object_store : & Arc < dyn ObjectStorage > ,
301
301
old_meta_file_path : RelativePathBuf ,
302
302
) -> anyhow:: Result < ( ) > {
303
303
// get the list of all meta files
@@ -328,9 +328,7 @@ async fn run_meta_file_migration(
328
328
Ok ( ( ) )
329
329
}
330
330
331
- async fn run_stream_files_migration (
332
- object_store : & Arc < dyn ObjectStorage + Send > ,
333
- ) -> anyhow:: Result < ( ) > {
331
+ async fn run_stream_files_migration ( object_store : & Arc < dyn ObjectStorage > ) -> anyhow:: Result < ( ) > {
334
332
let streams = object_store
335
333
. list_old_streams ( )
336
334
. await ?
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ pub static CONFIG: Lazy<Arc<Config>> = Lazy::new(|| Arc::new(Config::new()));
39
39
#[ derive( Debug ) ]
40
40
pub struct Config {
41
41
pub parseable : Cli ,
42
- storage : Arc < dyn ObjectStorageProvider + Send + Sync > ,
42
+ storage : Arc < dyn ObjectStorageProvider > ,
43
43
pub storage_name : & ' static str ,
44
44
}
45
45
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ impl ObjectStorageProvider for AzureBlobConfig {
163
163
RuntimeConfig :: new ( ) . with_object_store_registry ( Arc :: new ( object_store_registry) )
164
164
}
165
165
166
- fn get_object_store ( & self ) -> Arc < dyn super :: ObjectStorage + Send > {
166
+ fn get_object_store ( & self ) -> Arc < dyn super :: ObjectStorage > {
167
167
let azure = self . get_default_builder ( ) . build ( ) . unwrap ( ) ;
168
168
// limit objectstore to a concurrent request limit
169
169
let azure = LimitStore :: new ( azure, super :: MAX_OBJECT_STORE_REQUESTS ) ;
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ impl ObjectStorageProvider for FSConfig {
67
67
RuntimeConfig :: new ( )
68
68
}
69
69
70
- fn get_object_store ( & self ) -> Arc < dyn ObjectStorage + Send > {
70
+ fn get_object_store ( & self ) -> Arc < dyn ObjectStorage > {
71
71
Arc :: new ( LocalFS :: new ( self . root . clone ( ) ) )
72
72
}
73
73
Original file line number Diff line number Diff line change @@ -58,15 +58,15 @@ use std::{
58
58
time:: { Duration , Instant } ,
59
59
} ;
60
60
61
- pub trait ObjectStorageProvider : StorageMetrics + std:: fmt:: Debug {
61
+ pub trait ObjectStorageProvider : StorageMetrics + std:: fmt:: Debug + Send + Sync {
62
62
fn get_datafusion_runtime ( & self ) -> RuntimeConfig ;
63
- fn get_object_store ( & self ) -> Arc < dyn ObjectStorage + Send > ;
63
+ fn get_object_store ( & self ) -> Arc < dyn ObjectStorage > ;
64
64
fn get_endpoint ( & self ) -> String ;
65
65
fn register_store_metrics ( & self , handler : & PrometheusMetrics ) ;
66
66
}
67
67
68
68
#[ async_trait]
69
- pub trait ObjectStorage : Sync + ' static {
69
+ pub trait ObjectStorage : Send + Sync + ' static {
70
70
async fn get_object ( & self , path : & RelativePath ) -> Result < Bytes , ObjectStorageError > ;
71
71
// TODO: make the filter function optional as we may want to get all objects
72
72
async fn get_objects (
Original file line number Diff line number Diff line change @@ -289,7 +289,7 @@ impl ObjectStorageProvider for S3Config {
289
289
RuntimeConfig :: new ( ) . with_object_store_registry ( Arc :: new ( object_store_registry) )
290
290
}
291
291
292
- fn get_object_store ( & self ) -> Arc < dyn ObjectStorage + Send > {
292
+ fn get_object_store ( & self ) -> Arc < dyn ObjectStorage > {
293
293
let s3 = self . get_default_builder ( ) . build ( ) . unwrap ( ) ;
294
294
295
295
// limit objectstore to a concurrent request limit
You can’t perform that action at this time.
0 commit comments