File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ impl ParseableServer for IngestServer {
116116 migration:: run_migration ( & PARSEABLE ) . await ?;
117117
118118 // local sync on init
119- tokio:: spawn ( async {
119+ let startup_sync_handle = tokio:: spawn ( async {
120120 if let Err ( e) = sync_start ( ) . await {
121121 tracing:: warn!( "local sync on server start failed: {e}" ) ;
122122 }
@@ -132,7 +132,9 @@ impl ParseableServer for IngestServer {
132132 let result = self . start ( shutdown_rx, prometheus. clone ( ) , None ) . await ;
133133 // Cancel sync jobs
134134 cancel_tx. send ( ( ) ) . expect ( "Cancellation should not fail" ) ;
135-
135+ if let Err ( join_err) = startup_sync_handle. await {
136+ tracing:: warn!( "startup sync task panicked: {join_err}" ) ;
137+ }
136138 result
137139 }
138140}
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ impl ParseableServer for QueryServer {
129129 }
130130
131131 // local sync on init
132- tokio:: spawn ( async {
132+ let startup_sync_handle = tokio:: spawn ( async {
133133 if let Err ( e) = sync_start ( ) . await {
134134 tracing:: warn!( "local sync on server start failed: {e}" ) ;
135135 }
@@ -150,7 +150,9 @@ impl ParseableServer for QueryServer {
150150 . await ?;
151151 // Cancel sync jobs
152152 cancel_tx. send ( ( ) ) . expect ( "Cancellation should not fail" ) ;
153-
153+ if let Err ( join_err) = startup_sync_handle. await {
154+ tracing:: warn!( "startup sync task panicked: {join_err}" ) ;
155+ }
154156 Ok ( result)
155157 }
156158}
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ impl ParseableServer for Server {
124124 storage:: retention:: load_retention_from_global ( ) ;
125125
126126 // local sync on init
127- tokio:: spawn ( async {
127+ let startup_sync_handle = tokio:: spawn ( async {
128128 if let Err ( e) = sync_start ( ) . await {
129129 tracing:: warn!( "local sync on server start failed: {e}" ) ;
130130 }
@@ -150,7 +150,9 @@ impl ParseableServer for Server {
150150 . await ;
151151 // Cancel sync jobs
152152 cancel_tx. send ( ( ) ) . expect ( "Cancellation should not fail" ) ;
153-
153+ if let Err ( join_err) = startup_sync_handle. await {
154+ tracing:: warn!( "startup sync task panicked: {join_err}" ) ;
155+ }
154156 return result;
155157 }
156158}
You can’t perform that action at this time.
0 commit comments