You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The #2029 updates the code to load server info, and update the client side user as the currentUser() returned from the server.
The code logic looks good if the client side application connects to ClickHouse cluster directly.
However, if multiple ClickHouse clusters are deployed behind a load balaner, there're problems.
In such a case, the load balancer might define the user in a custmized format to contain cluster information for routing like user-cluster,
And it removes the cluster from the user parameter, and then routes queries to corresponding clickhouse clusters directly.
So, user-cluster is the right user name for the client in this case, but the above PR updates the client side user as currentUser(), which is user in this case, for subsquent queries, they will fail at the load balancer side because the user parameter is lack of the cluster information.
So, if the user parameter is given by the user configuration, we should NOT change the user name returned from the server, we SHOULD always use the use name provided by user configuration.
Affected 0.8.1 and above releases
The text was updated successfully, but these errors were encountered:
The #2029 updates the code to load server info, and update the client side user as the
currentUser()
returned from the server.The code logic looks good if the client side application connects to ClickHouse cluster directly.
However, if multiple ClickHouse clusters are deployed behind a load balaner, there're problems.
In such a case, the load balancer might define the
user
in a custmized format to contain cluster information for routing likeuser-cluster
,And it removes the
cluster
from the user parameter, and then routes queries to corresponding clickhouse clusters directly.So,
user-cluster
is the right user name for the client in this case, but the above PR updates the client side user ascurrentUser()
, which isuser
in this case, for subsquent queries, they will fail at the load balancer side because the user parameter is lack of the cluster information.So, if the
user
parameter is given by the user configuration, we should NOT change the user name returned from the server, we SHOULD always use the use name provided by user configuration.Affected 0.8.1 and above releases
The text was updated successfully, but these errors were encountered: