-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: handle the X-Databend-Route-Hint header returned from the server side #280
Comments
Hi @flaneur2020 , the jdbc has handle the logic as same as go driver, maybe you can check here: https://github.com/databendlabs/databend-jdbc/blob/main/databend-client/src/main/java/com/databend/client/DatabendClientV1.java#L312 |
If so maybe we can delete this? private static class RouteHint
extends AbstractConnectionProperty<String> {
public RouteHint() {
super("route_hint", NOT_REQUIRED, ALLOWED, STRING_CONVERTER);
}
} It's no usage. |
if the code is not being referenced, i guess it's good to clean it up 🤔 |
thank you for clarifying this, i believe the behaviour is aligned with the go-driver. here the implmenetation stores the it in |
on some cases, the server will response a X-Databend-Route-Hint header in the response.
when server responded this header, the client should forget its own generated rout-hint, and remember the route-hint returned from the server.
this header is useful to keep the client session sticky on the same cluster when there're multiple clusters in the server side.
it seems that the jdbc driver still haven't processed this header from the server response yet.
may reference the logic in the go driver: https://github.com/databendlabs/databend-go/blob/main/client.go#L500
The text was updated successfully, but these errors were encountered: