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 {
116
116
migration:: run_migration ( & PARSEABLE ) . await ?;
117
117
118
118
// local sync on init
119
- tokio:: spawn ( async {
119
+ let startup_sync_handle = tokio:: spawn ( async {
120
120
if let Err ( e) = sync_start ( ) . await {
121
121
tracing:: warn!( "local sync on server start failed: {e}" ) ;
122
122
}
@@ -132,7 +132,9 @@ impl ParseableServer for IngestServer {
132
132
let result = self . start ( shutdown_rx, prometheus. clone ( ) , None ) . await ;
133
133
// Cancel sync jobs
134
134
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
+ }
136
138
result
137
139
}
138
140
}
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ impl ParseableServer for QueryServer {
129
129
}
130
130
131
131
// local sync on init
132
- tokio:: spawn ( async {
132
+ let startup_sync_handle = tokio:: spawn ( async {
133
133
if let Err ( e) = sync_start ( ) . await {
134
134
tracing:: warn!( "local sync on server start failed: {e}" ) ;
135
135
}
@@ -150,7 +150,9 @@ impl ParseableServer for QueryServer {
150
150
. await ?;
151
151
// Cancel sync jobs
152
152
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
+ }
154
156
Ok ( result)
155
157
}
156
158
}
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ impl ParseableServer for Server {
124
124
storage:: retention:: load_retention_from_global ( ) ;
125
125
126
126
// local sync on init
127
- tokio:: spawn ( async {
127
+ let startup_sync_handle = tokio:: spawn ( async {
128
128
if let Err ( e) = sync_start ( ) . await {
129
129
tracing:: warn!( "local sync on server start failed: {e}" ) ;
130
130
}
@@ -150,7 +150,9 @@ impl ParseableServer for Server {
150
150
. await ;
151
151
// Cancel sync jobs
152
152
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
+ }
154
156
return result;
155
157
}
156
158
}
You can’t perform that action at this time.
0 commit comments