Skip to content

Commit a4159fc

Browse files
committed
small fixes
1 parent 54d3c37 commit a4159fc

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

gateway-ha/src/main/java/io/trino/gateway/ha/router/BaseRoutingManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public ProxyBackendConfiguration provideDefaultBackendConfiguration(String user)
107107
* has no suitable backend unless {@code strictRouting} is true, in which case a 404 is returned.
108108
*/
109109
@Override
110-
public ProxyBackendConfiguration provideBackendConfiguration(String routingGroup, String user, Boolean strictRouting)
110+
public ProxyBackendConfiguration provideBackendConfiguration(String routingGroup, String user, boolean strictRouting)
111111
{
112112
List<ProxyBackendConfiguration> backends = gatewayBackendManager.getActiveBackends(routingGroup).stream()
113113
.filter(backEnd -> isBackendHealthy(backEnd.getName()))

gateway-ha/src/main/java/io/trino/gateway/ha/router/RoutingManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ public interface RoutingManager
8181
*
8282
* @param routingGroup the routing group to use for backend selection
8383
* @param user the user requesting the backend
84-
* @param strictRouting whether to enforce isolation
84+
* @param strictRouting whether to force strict routing
8585
* @return the backend configuration for the selected cluster
8686
*/
87-
ProxyBackendConfiguration provideBackendConfiguration(String routingGroup, String user, Boolean strictRouting);
87+
ProxyBackendConfiguration provideBackendConfiguration(String routingGroup, String user, boolean strictRouting);
8888
}

gateway-ha/src/main/java/io/trino/gateway/ha/router/schema/RoutingGroupResponse.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,13 @@
2525
Implementations of this interface are used to:
2626
* Specify the target routing group for a request
2727
* Provide additional headers that should be added to the request
28+
* Specify whether strict routing should be used
2829
*/
2930
public interface RoutingGroupResponse
3031
{
3132
@Nullable String routingGroup();
3233

3334
Map<String, String> externalHeaders();
3435

35-
Boolean strictRouting();
36+
@Nullable Boolean strictRouting();
3637
}

gateway-ha/src/main/java/io/trino/gateway/ha/router/schema/RoutingSelectorResponse.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
* Response from the routing service that includes:
2323
* - routingGroup: The target routing group for the request (Optional)
2424
* - externalHeaders: Headers that can be set in the request (Currently can only be set in ExternalRoutingGroupSelector)
25-
* - strictRouting: If true, the handler must not fall back to default when target group has no available backend;
25+
* - strictRouting: If true, the handler must not fall back to default when target group has no available backend (Optional)
2626
* instead, a 4xx should be returned.
2727
*/
28-
public record RoutingSelectorResponse(@Nullable String routingGroup, Map<String, String> externalHeaders, Boolean strictRouting)
28+
public record RoutingSelectorResponse(@Nullable String routingGroup, Map<String, String> externalHeaders, @Nullable Boolean strictRouting)
2929
implements RoutingGroupResponse
3030
{
3131
public RoutingSelectorResponse {

0 commit comments

Comments
 (0)