File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
gateway-ha/src/main/java/io/trino/gateway/ha/router Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 2525import io .trino .gateway .ha .config .ProxyBackendConfiguration ;
2626import io .trino .gateway .ha .config .RoutingConfiguration ;
2727import jakarta .annotation .Nullable ;
28+ import jakarta .annotation .PreDestroy ;
2829import jakarta .ws .rs .HttpMethod ;
2930
3031import java .net .HttpURLConnection ;
@@ -278,6 +279,16 @@ public String load(String queryId)
278279 private boolean isBackendHealthy (String backendId )
279280 {
280281 TrinoStatus status = backendToStatus .getOrDefault (backendId , TrinoStatus .UNKNOWN );
282+ if (status == TrinoStatus .UNKNOWN ) {
283+ log .warn ("Backend health for '%s' is UNKNOWN and not tracked." , backendId );
284+ return false ;
285+ }
281286 return status == TrinoStatus .HEALTHY ;
282287 }
288+
289+ @ PreDestroy
290+ public void shutdown ()
291+ {
292+ executorService .shutdownNow ();
293+ }
283294}
You can’t perform that action at this time.
0 commit comments