File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -236,17 +236,14 @@ impl HotTierManager {
236
236
237
237
///sync the hot tier files from S3 to the hot tier directory for all streams
238
238
async fn sync_hot_tier ( & self ) -> Result < ( ) , HotTierError > {
239
- let streams = STREAM_INFO . list_streams ( ) ;
240
- let sync_hot_tier_tasks = FuturesUnordered :: new ( ) ;
241
- for stream in streams {
239
+ let mut sync_hot_tier_tasks = FuturesUnordered :: new ( ) ;
240
+ for stream in STREAM_INFO . list_streams ( ) {
242
241
if self . check_stream_hot_tier_exists ( & stream) {
243
- sync_hot_tier_tasks. push ( async move { self . process_stream ( stream) . await } ) ;
244
- //self.process_stream(stream).await?;
242
+ sync_hot_tier_tasks. push ( self . process_stream ( stream) ) ;
245
243
}
246
244
}
247
245
248
- let res: Vec < _ > = sync_hot_tier_tasks. collect ( ) . await ;
249
- for res in res {
246
+ while let Some ( res) = sync_hot_tier_tasks. next ( ) . await {
250
247
if let Err ( err) = res {
251
248
error ! ( "Failed to run hot tier sync task {err:?}" ) ;
252
249
return Err ( err) ;
You can’t perform that action at this time.
0 commit comments