74
74
75
75
/// Flushes arrows onto disk every `LOCAL_SYNC_INTERVAL` seconds, packs arrows into parquet every
76
76
/// `STORAGE_CONVERSION_INTERVAL` secondsand uploads them every `STORAGE_UPLOAD_INTERVAL` seconds.
77
- #[ tokio:: main( flavor = "current_thread" ) ]
77
+ #[ tokio:: main( flavor = "multi_thread" , worker_threads = 2 ) ]
78
78
pub async fn handler ( mut cancel_rx : oneshot:: Receiver < ( ) > ) -> anyhow:: Result < ( ) > {
79
79
let ( localsync_handler, mut localsync_outbox, localsync_inbox) = local_sync ( ) ;
80
80
let ( mut remote_sync_handler, mut remote_sync_outbox, mut remote_sync_inbox) =
@@ -86,10 +86,10 @@ pub async fn handler(mut cancel_rx: oneshot::Receiver<()>) -> anyhow::Result<()>
86
86
remote_sync_inbox. send( ( ) ) . unwrap_or( ( ) ) ;
87
87
localsync_inbox. send( ( ) ) . unwrap_or( ( ) ) ;
88
88
if let Err ( e) = localsync_handler. await {
89
- error!( "Error joining remote_sync_handler: {:?}" , e ) ;
89
+ error!( "Error joining remote_sync_handler: {e :?}" ) ;
90
90
}
91
91
if let Err ( e) = remote_sync_handler. await {
92
- error!( "Error joining remote_sync_handler: {:?}" , e ) ;
92
+ error!( "Error joining remote_sync_handler: {e :?}" ) ;
93
93
}
94
94
return Ok ( ( ) ) ;
95
95
} ,
@@ -101,7 +101,7 @@ pub async fn handler(mut cancel_rx: oneshot::Receiver<()>) -> anyhow::Result<()>
101
101
_ = & mut remote_sync_outbox => {
102
102
// remote_sync failed, this is recoverable by just starting remote_sync thread again
103
103
if let Err ( e) = remote_sync_handler. await {
104
- error!( "Error joining remote_sync_handler: {:?}" , e ) ;
104
+ error!( "Error joining remote_sync_handler: {e :?}" ) ;
105
105
}
106
106
( remote_sync_handler, remote_sync_outbox, remote_sync_inbox) = object_store_sync( ) ;
107
107
} ,
@@ -212,7 +212,7 @@ pub fn local_sync() -> (
212
212
future. await ;
213
213
}
214
214
Err ( panic_error) => {
215
- error ! ( "Panic in local sync task: {:?}" , panic_error ) ;
215
+ error ! ( "Panic in local sync task: {panic_error :?}" ) ;
216
216
}
217
217
}
218
218
0 commit comments