-
Notifications
You must be signed in to change notification settings - Fork 705
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
fix(query): show processlit host is null in HTTPQuery #15363
Conversation
cc @wubx |
In cloud, the client ip will be gateway? |
cc @flaneur2020 @ZhiHanZ Cloud you please answer this question? BTW, we had a method get_client_ip it use the same way to parse req.uri.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, i think using databend/src/query/service/src/servers/http/middleware.rs get_client_ip might be better
not only cloud, whenever you put a proxy up front of the query instances, you will get the ip of the proxy. when you had a proxy, it'd better to utilize the |
So in cloud it will display as null? Because only a IP can not parse as socketaddr. Here the host is ip:port |
IMHO it will be filled up with the proxy's ip address 🤔 |
Does the show procelist need to display ports? Now the get client ip address will be obtained from the header. But this is a pure ip, and it's represented by a string. In our current session ctx, client_ip is Option. This appears to be CK-compatible behavior. But the port should be meaningless information. So you want to set session _ctx.client_ip: Option and discard the port. |
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
Fix show processlit host is null in HTTPQuery.
In HTTP auth , init the client addr.
Tests
Type of change
This change is